Wordpress | Mixed Content after change URL

45 views Asked by At

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://

1

There are 1 answers

0
Pof On

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