Last Updated on 26th December 2020 by Ajmer Singh
This article contains a detailed guide on how to fix mixed content error in WordPress.
Have you ever ran across the mixed content issue on your site? Often times, it is as a result of migrating from HTTP to HTTPS.
During the process of migration, some files were carried over.
Hence, the end product is a mixed content error.
Wondering what the mixed content error is? I will explain in the next paragraph.
what does the mixed content error mean?
Mixed content error is said to happen if your website loads over a secured HTTPS connection, but other content such as the image, scripts, are loaded over an insecure HTTP connection.
If a site displays the mixed content error, it simply means that some of the content on that site is not secured and is susceptible to malware attacks.
However, there are two types of mixed content, and I will be explaining them below;
Types of mixed content error
we have two types of mixed content error namely:
- Passive mixed content error
- Active mixed content error
Passive mixed content error
Mixed content error is said to be passive when the HTTP content of the site is restricted and cannot react with the rest of the page. (Images and videos)
For instance, an attacker can have access to only the videos or image content on the site but is restricted and can’t have access to alter any change to the rest of the page.
Often times, the passive mixed content error is not considered a threat to a site, but in actual fact, it is.
An attacker can decide to replace the image or video content on your site with nudes and indecent content, or with ads that redirect users to a different site.
This defaces your site to users, hence the need to act fast.
2. Active mixed content error
A mixed content error is said to be active when the unencrypted HTTP content is not restricted, It can interact with and alter the entire page.
The active mixed content poses more threat to a site’s page than the passive mixed content.
Once compromised, an attacker has access to the entire webpage and can alter or make changes on the entire page.
The attacker has access to sensitive information about your users and this might include their login details, their bank information, etc.
He can decide to redirect users to an attacker’s site and can also make use of the sensitive information of users against them.
Most browser often indicates that a site isn’t secured and it contains mixed content, However, some browsers block the active mixed content.
However, each rule varies with different browsers.
Read our article on how to move from HTTP to HTTPS in WordPress
Causes of mixed content error
The mixed content error appears often times after the migration of a WordPress site from HTTP to HTTPS.
Some of the content refuses to be loaded over the HTTPS, hence mixed content warning occurs.
Below are some of the causes of mixed content warnings;
- Images that have hardcoded URLs (Images that run over HTTP)
- Links attached to the HTTP version of external scripts
- Embedded video script that is loaded om HTTP instead of HTTPS
Where to check mixed contents?
To know if your site contains the mixed content error
- Simply right-click or Ctrl+SHIFT+I on your web page
- Choose the ‘inspect‘ option from the series of options displayed
- A page will pop open on the right side of the page.
- Click on the console tab. If your site has any mixed content error, it will be displayed here.
How to fix mixed content error in WordPress
The first approach to getting the mixed content error fixed in WordPress is to install and activate the SSL Insecure Content Fixer plugin.
Upon activation, navigate to the settings page of the SSL insecure content fixer plugin to get it configured.
The plugin provides five levels of fixing the mixed content error, I will give an explanation to each one of them.
- Capture all.
This is the most recommended and fastest method of fixing mixed content errors in WordPress for beginners.
It fixes mixed content errors for scripts, style sheet, and WordPress media automatically.
If after trying out the simple method, the mixed content error on your site isn’t fixed, try out this method.
It uses all the features found in the simple method, but it also has an additional feature of fixing WordPress content and text widgets.
These contain all the features in the content method.
It has an additional feature of fixing resources loaded in the WordPress widgets of your site
The capture method, however, captures every page on your website including the header and footer of your page.
It also replaces all URLs with HTTPS.
The disadvantage of this method is that it is quite slow and it affects the performance of your site.
After you have tried out all the methods listed above, and you still don’t get your expected result, try this method.
The capture all method fixes everything on your site.
However, the downside of this method is that it has a negative impact on the performance of your site.
After you have successfully activated and configured the SSL insecure content fixer plugin, it’s time to verify that the issue is solved.
How to verify that the mixed content issue is solved
In this paragraph, I will be illustrating how you can verify that the mixed content error issue on your site has been solved.
To verify, simply use the whynopadlock online tool to check. This tool consequently checks your website and informs you about the success of the process.
All you need do is to simply visit the whynopadlock website on your browser. Enter the URL of your site.
Click on the test page option displayed.
You will receive a response similar to the image below if the mixed content issue has been resolved on your site.
Another method of verifying that the mixed content error issue has been fixed is by clicking around a few pages and checking the browser status indicator in the search bar.
A secured padlock indicates that the error has been fixed
If after clicking a few pages, the mixed content error isn’t fixed, you will have to revisit the plugin and restart the configuration process.
I hope you learned from our article how to fix mixed content error in WordPress? You might also want to read what is SSL certificate and how does it work
People also search for :
Ajmer Singh is the Founder & Author of Findmytricks. He is a passionate blogger and with the help of his articles, you can learn WordPress & Blogging in a simple way.
1. “Be yourself. Everyone else is already taken.”
2. “First, learn the rules, then break them”