Unable to load mixed content after switching to cloudflare

I have just switched to Cloudflare as my DNS to serve my Wordpress site from a Digital ocean droplet. Although I am able to access the site the content is not being loaded properly as per the following errors in console.

I have automatic rewrites on which I thought would have solved the issue but this is not the case. Any ideas?

That’s weird it’s using an IP address. Hopefully those aren’t hard-coded in your website’s database. Try setting your site’s URL in wp-config.php:

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

If that doesn’t work, you may have to do a Search-Replace in the WordPress database. Replace http://THATIP ADDRESS (the actual numbers) with https://example.com (but use your actual domain name)

1 Like

Also being discussed over here, https://stackoverflow.com/questions/56464545/Cloudflare-blocks-mixed-content-from-wordpress-deployment/56465271#56465271. +1 to the solution from @sdayman

PS - you may want to remove images & mention of your IP :slight_smile:

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.