Are you seeing a mixed content error on your WordPress site in your browser?
It occurs due to incorrect HTTP/SSL settings. In general, this does not affect the functionality of the web resource, but it can adversely affect SEO. Let’s see how to fix mixed content errors in WordPress.
What is a mixed content error?
SSL adds an extra layer of security to the transmission of data in a web browser. Google also recommends using a secure protocol.
If you set up SSL correctly, you will see a padlock icon in the address bar in your browser.
If HTTP/SSL is configured incorrectly, an exclamation mark will appear next to the padlock.
This indicates that although the site is using an SSL certificate, some content is still available over insecure HTTP. This can be found in the Web Browser Console as a warning with details for each such element.
If only one element is found, then it can be corrected manually by editing the post, page, or topic.
But usually, the mixed content is stored in the database. In this case, it is difficult to detect and fix it yourself.
Also see: Enable Automatic Updates in WordPress
How to fix mixed content errors in WordPress?
There are 2 ways.
Method 1: SSL Insecure Content Fixer Plugin
- Install the free add-on.
- Once activated, go to Settings > SSL Insecure Content.
- The default is a WordPress feature that will work for most sites.
- Don’t forget to click the Save Changes button to save your settings.
Other options are needed if you are using Cloudflare CDN or Nginx web server.
Method 2: Better Search and Replace Plugin
- This is another handy solution for getting the HTTPS protocol to work properly.
- After installation and activation in the admin panel, open Tools > Better Search Replace.
- In the Search field, enter your website address using HTTP, and in Replace with, enter HTTPS.
- Select all database tables that need to be replaced.
- Click the Start Find/ Replace button to start the replacement process.
The plugin works with the WordPress database, so it will not be able to change links in the code of themes and plugins.