Key takeaways
- Mixed content means an HTTPS page still loads some files over HTTP. Browsers block scripts, stylesheets and iframes loaded that way.
- On WordPress, old http:// URLs hide in post content, options, widgets, page builder data, theme files and plugin settings.
- Find them in the browser console, with a crawl and with a dry run of WP-CLI search-replace before you change anything.
- Fix the source, not just the symptom. The upgrade-insecure-requests header is a safety net, not a clean-up.
- Redirects, canonicals, internal links and sitemaps should all point to HTTPS, or the move is only half done.
WordPress mixed content is one of the most common leftovers I find after a site moves to HTTPS. The certificate works, the padlock shows on the home page, and everyone moves on. Months later a contact form stops working on some pages, a slider has no styles, or the browser marks a blog post as not secure. Cleaning that up properly is a standard part of my WordPress SEO consulting work.
This article is about finding and fixing the HTTP leftovers on a WordPress site. If your question is whether HTTPS itself helps rankings, I answered that separately in is HTTPS still a Google ranking signal.
I first published this article in 2025 and have rewritten it, removing statistics and claims I could not trace to any source.
What mixed content is and why browsers care
web.dev’s explanation of what mixed content is starts simply: “A page has mixed content when its initial HTML is loaded over a secure HTTPS connection,” while other resources on the page are loaded over HTTP. It then splits those resources into two kinds.
- Passive mixed content, “including images, video, and audio, doesn’t interact with the rest of the page”.
- Active mixed content “interacts with the page as a whole. This includes scripts, stylesheets, iframes, and any other code the browser can download and execute.”
The same page says “Most browsers now block mixed content for security reasons,” and that Chrome in some cases upgrades passive mixed content to HTTPS automatically. “If there’s no secure version, the asset doesn’t load.” It also notes that with passive mixed content present, “most browsers indicate in the address bar that the page isn’t secure.”
For SEO, the practical point is this. A blocked stylesheet or script is missing for visitors, and the page may also render differently when Google processes it. A broken layout, a missing menu or a form that never loads are the problems that matter, more than the warning itself.
Where WordPress keeps old HTTP links
WordPress stores many URLs as full addresses, including the protocol. When a site moves to HTTPS, changing the two addresses in Settings, General fixes the URLs WordPress builds itself. It does not touch the URLs already saved elsewhere. In audits I usually find them in these places:
- post and page content, especially images and links added before the move;
- custom fields and page builder data, often stored as serialized arrays;
- widgets, menus and Customizer settings, such as a logo or background image;
- CSS files generated by a page builder or theme, which keep the old URLs until they are rebuilt;
- theme template files and functions.php with hard-coded http:// links;
- plugin settings, such as a form plugin’s script or a tracking snippet pasted years ago;
- third-party embeds, such as an old map, video or booking widget that only offered HTTP.
Each of these needs a different fix, so I find them all before changing anything.
How to find WordPress mixed content
web.dev’s guide to fixing mixed content says “the browser alerts you to mixed content as errors and warnings in the JavaScript console.” That is the first check, and it is quick: open a page, open the developer tools, reload and read the console. Do it for one page of each template, not just the home page.
The console only shows the page you are on. For the rest of the site I use three more checks:
- A crawl of the site that reports any http:// resource on HTTPS pages.
- A database search. The WP-CLI search-replace command has a –dry-run option that will “Run the entire search/replace operation and show report, but don’t save changes to the database.” It shows how many http:// references each table holds without changing them.
- A report-only policy. web.dev notes “You can use content security policy to collect reports of mixed content on your site,” using the Content-Security-Policy-Report-Only header, which reports problems without blocking anything.
Look for references to your own domain first, since those are the easiest to fix. Then list the external http:// resources separately.
Fixing it without breaking the site
Take a full backup first, and if you can, run the change on a staging copy. Then work from the database outwards.
Database content
The WP-CLI command is the safest tool I know for this, because, as its documentation says, it “intelligently handles PHP serialized data, and does not change primary key values.” A plain SQL find and replace can break serialized data when the length of a string changes. I replace the full old address with the full new one, for example http://example.com with https://example.com, rather than every http:// on the site. I also leave the guid column alone, using the command’s –skip-columns option, because it is an identifier rather than a link people follow.
Generated files, theme and plugins
After the database change, rebuild any CSS files your page builder or theme generates, and clear the page cache and the CDN cache. Then search the theme and any custom plugin code for hard-coded http:// links and change them.
External resources
For files on other domains, web.dev suggests checking whether the resource is available over HTTPS by changing the address in the browser. If it is, “you can safely change the http:// URL for the resource in your code to https://.” If not, the options are to host it yourself “if you are legally allowed to do so”, load it from another host, or remove it.
Redirects, canonicals and the proxy redirect loop
Mixed content is one half of an HTTPS move. The other half is telling search engines which version is real. web.dev’s guide to enabling HTTPS says to “Use 301 (Moved Permanently) to indicate to search engines and browsers that the HTTPS version is canonical,” and that “Ultimately you should redirect HTTP requests to HTTPS and use HTTP Strict Transport Security (HSTS).”
Google’s guide to site moves with URL changes lists HTTP to HTTPS as one of the URL changes it covers. It says “Use server side permanent redirects if technically possible,” to “Change the internal links on the new site from the old URLs to the new URLs,” and that each new URL should have a self-referencing canonical tag.
| Item | What it should show | Common WordPress miss |
|---|---|---|
| Redirect | One 301 from each http:// URL to its https:// version | Chains through www and non-www, or a plugin redirect on top of a server redirect |
| Canonical tag | The https:// URL of the page itself | A hard-coded canonical in the theme still on http:// |
| Internal links | https:// or relative links | Old links in post content and menus |
| XML sitemap | Only https:// URLs | A static sitemap file left from the old set-up |
| HSTS header | Strict-Transport-Security, set once HTTPS works everywhere | A long max-age switched on before subdomains were ready |
On HSTS, web.dev advises: “You can start with low values and gradually increase the max-age”. That is good advice on any site with subdomains you have not checked.
The reverse proxy loop
Many WordPress sites sit behind a load balancer or CDN that handles HTTPS. WordPress then sees a plain HTTP request, and forcing HTTPS creates a redirect loop. The WordPress documentation on HTTPS for WordPress describes this case: when “WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL,” it can loop, and WordPress should read the HTTP_X_FORWARDED_PROTO header if the proxy sets it. In my experience the same mismatch also makes some plugins build http:// URLs, which brings the mixed content back.
Keeping WordPress mixed content from coming back
The upgrade-insecure-requests directive “instructs the browser to upgrade insecure URLs before making network requests,” according to web.dev. It is a useful safety net. It is not a fix: the old URLs are still in your database and code, and a resource that has no HTTPS version still fails.
Mixed content is rarely one big mistake; it is a hundred small old links, and they come back unless someone checks.
What keeps it clean is routine. I check the console on each main template after theme or plugin updates, I keep the report-only policy running if the site has one, and I ask editors to upload images to the media library instead of pasting addresses from other sites.
FAQ
Does mixed content hurt rankings in Google?
I have not seen Google say it penalises mixed content directly. The real risk is what blocked files do: missing styles, scripts or forms change what visitors and Google get on the page. Fix it for that reason.
Will a plugin that forces HTTPS fix mixed content?
It can hide much of it by rewriting URLs as pages load. The old addresses stay in the database and code, so I prefer to fix the source and use such a plugin, if at all, only as a temporary bridge.
Why do I still see mixed content after a search and replace?
Usually because of generated CSS files, caches, hard-coded theme or plugin URLs, or external resources. Rebuild generated files, clear every cache, and check the console again.
Should I use protocol-relative URLs like //example.com?
web.dev recommends making intra-site URLs as relative as possible. Once the whole site runs on HTTPS, plain https:// URLs or relative paths are the clearest choice.




