Key takeaways
- Mixed content means a secure HTTPS page is loading some files, such as images or scripts, over insecure HTTP.
- Fix the source: update the site address settings, replace old http links in the database and correct hard-coded theme or plugin URLs.
- Back up first, add a site-wide redirect to HTTPS, then recheck key pages, forms and checkout in a browser's developer tools.
To fix mixed content warnings in WordPress, find every image, script, stylesheet or embed still loading over http and change it to https, starting with the WordPress Address and Site Address settings and then the old links stored in your database. Once nothing on the page loads over http, the browser shows the site as secure again.
This guide is for UK small business owners who have added an SSL certificate, switched their WordPress site to HTTPS and found the padlock missing, a "not fully secure" notice in the address bar, or images and features that no longer work. It explains what is happening, how to find the culprits and how to fix them in a safe order.
What mixed content means
When a page loads over HTTPS, the connection between the visitor's browser and your server is encrypted. A typical page also loads many other files: images, fonts, stylesheets, scripts, videos and embedded maps or forms. If any of those files are requested over plain http, the page is mixing secure and insecure content.
Browsers handle this in two ways. Passive content such as images may be upgraded automatically or loaded with a warning, so the padlock disappears or changes. Active content such as scripts and stylesheets is usually blocked, which can break menus, sliders, forms or even the checkout. Either way, visitors see a site that looks less trustworthy, which is the opposite of what a certificate is for. Our guide to website trust signals explains why that first impression matters.
Why it happens in WordPress
WordPress stores full web addresses in many places. When a site starts life on http, every image you upload, every internal link you add and many theme and plugin settings are saved with http at the front. Installing a certificate does not rewrite those stored addresses. Common sources include:
- The site address settings under Settings, then General, still set to http.
- Images and links in posts and pages saved with the full http address.
- Theme options and page builder data, such as a logo or background image set in the customiser.
- Widgets and menus with custom links typed in by hand.
- Hard-coded addresses in theme files or custom code snippets.
- Third-party embeds, such as an old video, map or booking widget pasted in using an http address.
Before you start
- Confirm the certificate works. Visit your homepage with https at the front. If you see a certificate error rather than a mixed content notice, the certificate itself needs fixing by your host.
- Take a full backup. Changing addresses in the database is reliable when done carefully, but a backup means a mistake costs minutes rather than days. Our guide to a website backup and recovery plan covers what to keep.
- Work on staging if you can. For a shop or a large site, run the changes on a staging copy first.
How to fix mixed content warnings in WordPress
- Update the WordPress Address and Site Address. In the dashboard, go to Settings, then General, and change both addresses from http to https. Save, and you will be asked to log in again. If these fields are greyed out, they are set in the wp-config.php file and need changing there.
- Replace old addresses in the database. Use a reputable search and replace tool or plugin to replace your old http address with the https version across the database. Choose one that handles serialised data correctly, because a simple text replacement can break settings stored by themes and plugins. Run a dry run first if the tool offers it.
- Check theme and builder settings. Look through the customiser, theme options and any page builder global settings for logo, favicon and background image addresses, and update anything still on http.
- Check menus and widgets. Custom links in menus and text in widgets can hold full addresses. Our WordPress menus guide shows where those links live.
- Fix hard-coded addresses in code. If the problem is in theme files or a code snippet, update the address there. If you use a child theme, make the change in the child theme so an update does not undo it.
- Update or replace old embeds. Re-embed videos, maps and widgets using the provider's current https code. If a third-party service does not support HTTPS at all, it is time to replace it.
- Clear every cache. Clear your caching plugin, any server cache from your host and your content delivery network if you use one, then check again in a private browsing window.
Finding what is still insecure
If the padlock is still missing after those steps, you need to find the remaining files. Open the page in your browser, open the developer tools and look at the console. Mixed content warnings name the exact file and its address. Note each one and trace where it comes from.
| Where the warning points | Likely source | Where to fix it |
|---|---|---|
| An image in your uploads folder | Old address in a post, page or builder layout | Database search and replace, or edit the content |
| A file in your theme folder | Hard-coded address in theme code | Child theme or theme settings |
| A file in a plugin folder | Plugin setting or outdated plugin | Plugin settings, update or replace the plugin |
| Another website's address | Embed or external script | Re-embed with current code or remove it |
Check more than the homepage. Templates differ, so test a blog post, a service page, the contact page and, for shops, a product page, the basket and the checkout.
Redirect everything to HTTPS
Once pages load cleanly, make sure anyone arriving on an old http address is sent to the https version with a permanent 301 redirect. Many hosts offer this as a setting in the control panel. Otherwise it can be added at server level or with a plugin. A site-wide redirect also helps search engines settle on one version of every page. Our guide to website redirects explains why permanent redirects matter.
Some plugins fix mixed content on the fly by rewriting addresses as each page loads. That can be a useful stopgap, but it adds work to every page load and hides the underlying problem. Fixing the stored addresses is the cleaner long-term answer.
After the fix
- Update your search tools. Check that your sitemap lists https addresses and that your Search Console property covers the https version. Our Google Search Console setup guide walks through this.
- Update analytics and ad links. Change the site address in analytics settings and any ad, email or social profile links that still use http.
- Test forms and payments. Submit each form and, for shops, run a test order. Payment and form scripts are often the active content browsers block.
- Watch certificate renewal. Most hosts renew certificates automatically, but an expired certificate causes a far worse warning than mixed content, so make sure someone gets the renewal notices.
When to get help
For a small brochure site, the steps above are usually enough. Larger sites, shops and sites built with heavy page builders can store addresses in unusual places, and a careless database replacement can do real damage. At Prism Works Studio we handle HTTPS moves and clean-ups as part of our website and ecommerce development work, and you can see how projects and support are structured on our pricing page.
FAQs
How do I fix mixed content warnings in WordPress?
Change the WordPress Address and Site Address to https, replace old http addresses in the database with a tool that handles serialised data, update theme, menu and widget links, re-embed old third-party content and clear all caches.
Why is my site not secure even though I have an SSL certificate?
Usually because some files on the page still load over http. The certificate secures the connection, but browsers will not show the site as fully secure until every image, script and stylesheet uses https too.
Can a plugin fix mixed content automatically?
Some plugins rewrite insecure addresses as each page loads. They can help as a temporary measure, but fixing the stored addresses in the database and theme is cleaner and avoids relying on extra code on every page.
Will switching to HTTPS affect my search rankings?
Moving to HTTPS is generally recommended, and a careful move with permanent redirects should not cause lasting harm. Expect search engines to take some time to process the change, and check current official guidance for site moves.
How do I find which files are causing mixed content?
Open the page in your browser, open the developer tools and check the console. Each mixed content warning names the insecure file address, which tells you whether it comes from your content, theme, a plugin or an external service.
Do I need to update links in old blog posts?
Yes, if they use full http addresses to your own site. A database search and replace updates them all at once. Links to other websites only need changing if those sites support HTTPS.