wpXpart

Error Fixes

How to Fix Mixed Content Warnings in WordPress (HTTPS Not Secure) in 2026

Fix mixed content warnings in WordPress in 8 steps: find insecure http files, set https site addresses, replace old URLs in the database, fix theme and plugins, force HTTPS and clear caches.

wpXpart AgencyPublished on November 25, 20268 min read
How to Fix Mixed Content Warnings in WordPress (HTTPS Not Secure) in 2026

You installed an SSL certificate, your site loads over https, and yet the browser still says Not secure, or the padlock is missing, or an image or script does not load. This is a mixed content problem, and it is one of the most common issues after moving a WordPress site to HTTPS. The good news is that it is usually easy to fix once you know which files are still loading over http.

This guide explains what mixed content means in WordPress and gives you 8 clear steps to find and fix it, from reading the browser console and updating URLs in the database to forcing HTTPS and clearing caches.

Quick answer: To fix mixed content in WordPress, find the insecure http files in your browser console, make sure the WordPress Address and Site Address use https, replace old http URLs in the database with https using a safe search and replace, fix hard-coded links in your theme, plugins and page builder, use one method to force HTTPS, and clear every cache. A temporary fallback is a header that upgrades insecure requests.
Illustration of mixed content on a WordPress site: an https page loading a logo and stylesheet securely but a hero image and a script over insecure http, with how browsers treat active and passive content
Illustration: an https page loading some files over http.

What is mixed content?

Mixed content happens when a page is loaded over secure HTTPS but some of its files, such as images, scripts, stylesheets, fonts or embedded frames, are still requested over insecure http. Browsers treat this as a risk, because an attacker could change the insecure file. Browsers may block risky files such as scripts, load others with a warning, and remove the secure padlock, which makes visitors lose trust.

Why does mixed content happen in WordPress?

CauseTypical clueFix
Old http URLs in posts and pagesIt began after you added SSLReplace them in the database
Site addresses still use httpSettings, General shows httpChange both addresses to https
Hard-coded links in the themeThe logo, a font or a script uses httpEdit the theme or ask the developer
Plugin or widget with http linksA chat, slider or embed failsUpdate or replace the plugin
Page builder dataImages in builder pages stay insecureUse the builder’s URL replace tool
External files over httpA third-party script or fontSwitch it to https
CDN or cacheYou fixed it but still see the warningClear caches and update CDN settings

Before you start

  • Make sure your SSL certificate works. Open your site with https and check there is no certificate error.
  • Take a full backup of your files and database, because you will change URLs in the database.
  • Use a staging site if the website is busy.
  • Open the browser console. It tells you exactly which files are insecure.

How to fix mixed content in WordPress: 8 steps

Six-step flow for fixing mixed content in WordPress: find the insecure files, match the site URLs, replace old http links, fix theme and plugins, force HTTPS and clear caches then retest
Illustration: six moves for fixing mixed content.

Step 1: Find the insecure files

Open the page that shows the warning, press F12 and open the Console tab, then reload the page. Look for lines that start with Mixed Content. Each one names the exact file that still loads over http, so you can see whether it is an image, a script or something else. You can also use a free online mixed content scanner to check several pages.

Illustration of a browser developer console showing a mixed content warning that names an insecure http image on an https page, with a tip to press F12 and reload the page
Illustration: a browser console mixed content warning.

Step 2: Set both site addresses to https

Go to Settings, General and make sure both the WordPress Address (URL) and the Site Address (URL) start with https and use the same www choice. If you cannot open the dashboard, you can set them in wp-config.php as shown in our guide to fixing too many redirects.

Step 3: Replace old http URLs in the database

Older posts and widgets often contain full http addresses. Replace them with https, using a safe tool. If you have WP-CLI, run a dry run first, then the real command, and skip the guid column:

wp search-replace 'http://yourwebsite.com' 'https://yourwebsite.com' --skip-columns=guid --dry-run
wp search-replace 'http://yourwebsite.com' 'https://yourwebsite.com' --skip-columns=guid

Replace the example with your real domain. If you prefer a plugin, use a search and replace plugin that has a dry run option, and always take a backup first.

Before and after illustration of a search and replace that changes an old http image address to https in the WordPress database, with a reminder to back up, run a dry run first and skip the guid column
Illustration: replacing http with https in the database.

Step 4: Fix your theme, plugins and page builder

Some links live in theme files, widget settings or builder data, not in posts. Check the theme’s logo, fonts and scripts, and update or replace plugins that still load http files. If you use Elementor, look for the Replace URL tool in the Elementor Tools settings, run it with your old http address and your new https address, and then regenerate the CSS and data. If a page builder stops loading after the change, see our guide to fixing Elementor not loading.

Step 5: Update external files to https

Third-party scripts, fonts, videos and embeds should use https addresses. Edit the code or the plugin setting that loads them. If a service does not support https, replace it with one that does.

Step 6: Force HTTPS with one method

Make sure all http visits are redirected to https, but use only one method, such as your host’s setting, a plugin or a rule in .htaccess. Using several methods together can create redirect loops. If that happens, follow our guide on how to fix too many redirects in WordPress.

Step 7: Use the upgrade-insecure-requests header as a fallback

As a temporary safety net, you can ask browsers to upgrade insecure requests to https automatically. On an Apache server you can add this to .htaccess, then test your site carefully:

<IfModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests"
</IfModule>

This only works when the files are actually available over https, and it does not replace fixing the real links. Treat it as a short-term helper, and remove it if it causes problems.

Step 8: Clear all caches and retest

Clear your caching plugin, your host cache, your CDN cache and your browser cache, and regenerate any minified or combined files. Then retest the page in a private window and check the console again. Test your home page, a post, a product page and your contact page.

Mixed content and SEO

HTTPS is a lightweight ranking signal, but the larger effects are on trust and experience. A missing padlock can scare visitors away, blocked scripts can break forms and checkout, and blocked images can hurt your design. Fix mixed content, keep one canonical https version of your site, and update your sitemap and internal links to https. For broader technical health, read our guide on how to improve Core Web Vitals on WordPress.

How to prevent mixed content

  • Use https for both WordPress addresses before you publish content.
  • Insert media from the Media Library so WordPress uses the right address.
  • Choose plugins, themes and external services that support https.
  • Run a mixed content check after every migration, theme change or plugin install.
  • Keep one redirect method and document it.
Checklist of eight checks that prevent mixed content on WordPress: https site addresses, replaced http links, https theme and plugin links, one redirect method, https external files, updated CDN and cache, https links in new content and retesting key pages
Illustration: a mixed content prevention checklist.

When to ask an expert for help

Ask for help if the warning remains after these steps, if a store or login page is affected, or if you are not comfortable changing database URLs. At wpXpart we fix SSL and mixed content problems, migrate sites to https and set up safe redirects. See our WordPress migration service, our maintenance services, or hire a WordPress expert.

Frequently asked questions

What does mixed content mean?

It means an https page is loading some files over insecure http, so the page is not fully secure.

Why is my padlock missing after I installed SSL?

Usually because some files, such as images or scripts, still load over http. Find them in the browser console and update the links.

Is mixed content dangerous?

It can be, because insecure files could be modified in transit, and browsers may block them or warn visitors. Fix it to keep visitors safe and your site trusted.

Will a plugin fix mixed content automatically?

Some plugins rewrite http links on the fly, but fixing the real URLs in the database and files is cleaner and faster.

Can mixed content break my site?

Yes. Blocked scripts can break menus, forms or checkout, and blocked styles or images can damage the design.

Does mixed content affect SEO?

It can hurt trust, user experience and conversions. Fix it and keep one https version of your site for the best results.

Is it safe to run a search and replace?

Yes, if you back up first, run a dry run, skip the guid column and test afterward.

Why do I still see the warning after fixing it?

Cached pages, a CDN, minified files or a hard-coded link in the theme can still contain http addresses. Clear all caches and check the console again.

Keep learning with these step-by-step guides from our team.

Conclusion

To fix mixed content in WordPress, find the insecure files in the console, use https for both site addresses, replace old http URLs in the database, fix your theme, plugins and builder data, force HTTPS with a single method and clear every cache. Done carefully, you will bring back the secure padlock and keep your visitors’ trust.

Need help? Start a project with wpXpart and we will secure your WordPress site.

Share this article
Article bywpXpart Agency

The wpXpart team designs, builds, speeds up and supports WordPress websites, and shares practical guides along the way.

Need help with your WordPress site?

Tell us about your project and get a clear, written proposal.

Start a Project

Stay tuned with our latest updates

Subscribe for practical WordPress tips and news.

Scroll to Top