This shows that while your website is using a SSL certificate, but some content on your website is still served from non HTTPS urls.
Fixing Mixed Content Error in WordPress
There is no need of any plugin to fix this mixed content error. Just add the following code in your .htaccess file.
RewriteOptions inherit RewriteEngine on Header set content-Security-Policy: upgrade-insecure-requests
Note: Be sure .htaccess re-write must be enabled on your hosting server. if it is disabled by your host provider you cannot save the above code in your .htaccess file.
Where to Find .htaccess file
.htaccess is most important file of your site. It contains all sensitive information about your site.
If you are using cPanel then login into it. Then goto Files => File Manager => public_html
In public_html folder your site .htaccess file is located. If you don’t see .htaccess file in in public_html folder then there is a Settings button on top right position. Click the Settings button. A popup will open. Tick the “Show Hidden Files (dotfiles)” option. Click Save
Now your .htaccess file will appear.
Select .htaccess file, click Edit and paste the above given code in it. Hit Save button.
If you are using Yoast SEO plugin then you also can do it with this.
Login to your wordpress admin panel => SEO => Tool => File Editor => .htaccess file
You can edit your .htaccess file content here. Paste the given code here and save the file.
Now most important thing. Don’t forgot to clear the cache of your both wordpress site and you pc browser.
After doing all steps, you will see all insecure pages are upgraded to secure one with a green lock.
If this article works for you then post your comments below.
Images Credits: Kinsta and WpBeginner
If you found this article helpful. Share it with others. Also Subscribe to our Newsletter and follow & Like Us on Twitter & Facebook and find perfect Web Hosting for your site with discount and deals.