How to Fix Mixed Content Warnings on an HTTPS Site
Your page loads over https, but some images, scripts or styles still load over http. Find them in your browser's developer console, then change those links to https. For many links, use a search-and-replace plugin after you back up your site.
Applies to: cPanel WordPress sites on Blue Arctic hosting
On this page
Mixed content means a page loads over secure https, but some of its parts still load over plain http. Browsers try to load some of these over https by themselves, such as pictures, audio and video; if there’s no https copy, they go missing. Others, such as scripts, styles and fonts, are blocked. That can break the layout, and the browser may say the page isn’t fully secure.
Note
If every page says “Not secure”, or you see a full-page warning, that isn’t mixed content. Follow How to Fix a “Not Secure” Warning first. Come back if some pages still show a warning.
Step 1: Find the insecure items
- Open the affected page in Chrome, Edge or Firefox.
- Open the developer tools: press F12 or Ctrl+Shift+I on Windows, or Cmd+Option+I on a Mac.
- Click the Console tab.
- Reload the page and look for warnings that mention mixed content, or that an insecure item was blocked or upgraded. Each names the
http://address that caused it. - Write down those addresses, and note whether they’re on your own domain or another website.
Step 2: Fix a few links in WordPress
Warning
Change the two WordPress addresses below only if https://yourdomain.com already opens without a certificate warning. A typing mistake in these fields can lock you out of WordPress.
- Go to Settings > General and look at WordPress Address (URL) and Site Address (URL).
- If either one starts with
http://, change only those letters tohttps://. Then click Save Changes. - If the fields are grayed out, they’re set in the
wp-config.phpfile. On Shared Web Hosting, Step 3 of How to Fix a “Not Secure” Warning shows how to change it. Otherwise, open a support ticket. - Clear your site’s cache (see how to clear your WordPress cache) and reload the page with the console open.
- For each warning that’s left, go to Pages or Posts and click Edit under the page it’s on. Find the picture, button or embed with that address and re-type its link with
https://, or add the item again. Save your change. Items in the header, footer or sidebar are under Appearance. - If an item comes from another website with no https version, replace or remove it.
- Clear the cache and reload. Use Step 3 only if warnings for your own domain are left and you can’t find their source.
Step 3: Replace many links at once
Warning
This step changes your whole database at once, and the plugin has no undo. A wrong entry can break your site. Don’t start without the backup in step 1, or before https://yourdomain.com opens without a warning.
- Make your own copy of the site. On Shared Web Hosting, follow How to Download a Backup of Your Website. On other hosting, or if you can’t make a copy, open a support ticket, ask how to get one, and wait for our reply.
- In WordPress, go to Plugins > Add Plugin and search for “Better Search Replace”.
- On the Better Search Replace card (by WP Engine), click Install Now, then Activate. If Install Now is grayed out, your WordPress or PHP is too old for this plugin: open a support ticket.
- Go to Tools > Better Search Replace.
- In Search for, type the old address only as far as the end of your domain name, such as
http://yourdomain.com. Includewwwonly if the console showed it. - In Replace with, type the same thing starting
https://. The two boxes must differ only by the letters. - In Select tables, click the first table, scroll to the end of the list, hold Shift and click the last one.
- Leave Replace GUIDs unticked and Run as dry run ticked, then click Run Search/Replace. A dry run only counts; it changes nothing.
- Read the line that starts DRY RUN. It says how many cells (places in your database) hold the old address. Any number above 0 is fine, large or small. If it says 0, check both boxes against the console and run it again. Still 0? Stop: the links aren’t in a form this tool can change. Do step 13, then open a support ticket with what the console showed.
- Check both boxes once more. Then untick Run as dry run and click Run Search/Replace again. The new line says how many cells changed.
- If the console also showed your address with (or without)
www, repeat steps 5 to 10 for it. - Clear your site’s cache.
- Go to Plugins > Installed Plugins. Click Deactivate under Better Search Replace, then click Delete.
How to tell it worked
Reload the page with the console open. No mixed content warnings appear, and the browser no longer says the page isn’t fully secure.
Troubleshooting
- The warning comes back: clear any CDN cache and your browser cache too.
- The link is inside a theme or plugin file: update the theme or plugin, or ask your developer to change the link.
- The site or dashboard stops loading after you change the addresses in Settings: open a support ticket straight away and say which field you changed.
- The site looks broken after the replacement: don’t run another replacement to reverse it. Follow How to Restore a Website Backup straight away. In a ticket, tell us when you ran the replacement and that you have your own copy.
Still need help?
Open a support ticket from the Client Portal at my.bluearctic.com. Include the page address, the mixed content warnings from the console, whether you already ran a search-and-replace, a screenshot, and what you already tried. Never include a password.