Fix Mixed Content in WordPress and Elementor
Mixed content in WordPress is a content problem, not a certificate problem. The site can have a perfect certificate and still show Not Secure, because the browser is complaining that an https page loaded something over http. The fix is to change the stored URLs at the source, then clear the caches that keep the old ones alive.
Fix mixed content in WordPress: confirm the certificate first
Before touching settings, check that port 443 actually serves a valid certificate for the exact hostname. Run the domain through the SSL Checker. If the chain is incomplete or the name does not match, fix that first: switching WordPress URLs to https:// on a broken certificate locks you out of the admin.
Find every insecure request: mixed content in WordPress
- Open the page in a browser, open developer tools, and reload. The console lists each blocked request with its URL.
- Filter the network tab for http:// and note every host and file type. Images and fonts are the usual first offenders.
- Check the page source for http:// occurrences of your own domain; those are the ones a search-replace can fix.
Change the two WordPress URLs
In Settings, General, set both WordPress Address and Site Address to https://. If the admin becomes unreachable, edit wp_options directly, or add these lines to wp-config.php before the stop-editing comment:
define('WP_HOME','https://example.com');
define('WP_SITEURL','https://example.com');
define('FORCE_SSL_ADMIN', true);
The FORCE_SSL_ADMIN line keeps the admin and checkout on HTTPS. If the site runs behind Cloudflare or an Nginx proxy, add the forwarded-protocol check, otherwise WordPress may loop:
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) {
$_SERVER['HTTPS'] = 'on';
}
Replace the URLs in the database safely
Do not run a plain SQL UPDATE. WordPress stores widget settings and theme options as serialised PHP, where the string length is encoded in the data. A shorter or longer URL corrupts it. Use a tool that understands serialisation:
wp search-replace 'http://example.com' 'https://example.com' --all-tables --precise
Back up the database first. Run with --dry-run to see the row count, then for real, then flush caches. If WP-CLI is not available, the Better Search Replace plugin does the same job from the admin.
Builders keep their own copies
- Elementor: Tools, Replace URL, then Regenerate Files and Data. Elementor stores compiled CSS in uploads, and the compiled file keeps the old http:// URLs until it is regenerated.
- Divi: Theme Options, Builder, Advanced, then clear the static CSS file generation. Divi writes per-page CSS files that survive a database replace.
- WPBakery and other builders: clear their cache and any compiled CSS, then re-save the page.
- WooCommerce: check Settings, Advanced for a hardcoded http:// checkout endpoint, and the payment gateway settings for an http:// return or webhook URL.
Fix the redirect, not only the content
Add a single 301 from HTTP to HTTPS at the server, above the WordPress block in .htaccess, or generate the Nginx equivalent with the HTTPS redirect generator. One hop, not a chain: a redirect to a redirect costs speed and confuses crawlers.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
CSP is a stopgap, not a fix
The upgrade-insecure-requests directive makes modern browsers fetch insecure subresources over https automatically. It hides the symptom. Use it while you clean the database, not instead of cleaning it, because older clients and some payment iframes still fail.
Then re-scan the cart, checkout and a product page with the Security Headers and Mixed Content scanner. Those three pages decide whether an order completes.
Search Console and canonicals
After the switch, confirm that every page has one canonical URL on the https hostname, and that the sitemap uses https. Add the HTTPS property in Search Console, submit the sitemap, and keep the HTTP property for a few months to catch stray links. The SEO and sitemap checker shows canonical and sitemap issues in one pass.
Related reading: leftover HTTP internal links and SEO after an HTTPS migration.
Frequently Asked Questions
Do I need an SSL plugin after fixing this?
No. Once the database and server are correct, a runtime SSL fixer adds PHP work on every request. Remove it after confirming the console is clean.
Why did HTTPS cause ERR_TOO_MANY_REDIRECTS?
The CDN or proxy is talking HTTP to the origin while WordPress redirects back to HTTPS. Set Cloudflare to Full (Strict), or add the forwarded-protocol check shown above.
Is it safe to delete the old http property in Search Console?
Not immediately. Keep it for a few months so you can see remaining HTTP traffic and confirm the redirects are working.
Do I need an SSL plugin after fixing this?
No. Once the database and server are correct, a runtime SSL fixer adds PHP work on every request. Remove it after confirming the console is clean.
Why did HTTPS cause ERR_TOO_MANY_REDIRECTS?
The CDN or proxy is talking HTTP to the origin while WordPress redirects back to HTTPS. Set the proxy to Full (Strict), or add the forwarded-protocol check shown above.
Is it safe to delete the old http property in Search Console?
Not immediately. Keep it for a few months so you can see remaining HTTP traffic and confirm the redirects are working.
Why does the warning come back after a builder update?
Builders store compiled CSS and per-page data with the old URLs. Run the builder's own replace or regenerate step after the database replace.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.