Sylwester Zabielski
Sylwester Zabielski

Reputation: 41

Wordpress | Mixed Content after change URL

After change Wordpress URL i noticed issue with mixed content.

In databse i define https:// URL. Also in wp config I define with https://

Also in CloudFlare I enable always use https, and automatic https rewrites.

The problem is after access to wordpress with https:// not load styles etc, and in log console I see mixed content error:

Wordpress still all data try load with http:// example http://wp-content/images/photo.jpg etc.

But all URL is definied with https://

Upvotes: 0

Views: 105

Answers (1)

Pof
Pof

Reputation: 979

How did you replace all url in DB ? Maybe you forgot some rows/tables when did it.

A good way to do that is to use wp cli search-replace command https://docs.wpvip.com/wp-cli-with-vip-cli/search-replace/

You can still run it on your DB with something like wp search-replace "http://mywebsite.com" "https://mywebsite.com" --all-tables

You can add the --dry-run and --report-changed-only flags to see results before real run

Upvotes: 0

Related Questions