in

See how to Fix Mixed Content Error in WordPress

WordPress Troubleshooting

When you shift your site from Non-SSL to SSL, you may get mixed content SSL errors. So what are these Mixed Content Errors.

Since earlier your site was running on Non-SSL, your site have pages or requests for HTTP, which is non-secure connection. Now after switching to SSL your site still may have older requests, posts and pages which can trigger warnings of non-secure website while browsing.

In simple words, Mixed Content is url’s of videos, images, css etc which are HTTP but load on HTTPS request. These sometime confuse the users as well as browsers to identify the content is scure or not. For example if one typed https://moonshotcentral.com in a browser and the site is having a tag request like <img src=”https://moonshotcentral.com/image.jpg”>, this location is mixed content as image.jpg will not loaded or give warning to users of nonsecure page over an encrypted connection as https://moonshotcentral.com.

This can reality hurt your website performance. Imagine user accessing your site and received an error saying do you want to process, site is not secure. Most of user wont click unless you are really famous. Specially for small blogs this should not be ignored as their site ranking also may go down.

Fix Mixed Content Error in WordPress

First Step:

You need to make your URL based on HTTPS and doing this by going to every post or images etc is a tedious process. Imagine having thousands of posts, this can be nightmare. Since links or URL of the WordPress post are stores in MySql database. You this do this by running a MySQL query in a single click. Awseome.

You can run your MySQL query by accessing your phpMyAdmin panel. But if your don’t want to dirty your hands, you can simply do this installing a plugin called WP-DBManager. This plugin help you to keep your WordPress site database updated. When you install the plugin you can see that there is option called “Run SQL Query”. Click on this option, copy and paste query below in the box provided and click run. The replace the domain name with your domain name and some themes may have tables called wp_posts, so you can changes the table name from wpnu_posts to wp_posts

UPDATE wpnu_posts SET `post_content` = REPLACE (`post_content`, ‘src=”https://moonshotcentral.com’, ‘src=”https://moonshotcentral.com’);

What this query will do is that it was update table wpnu_posts (or wp_posts in some cases) and replace all your non HTTP urls with HTTPs urls in one go.

Second Step:

Make sure that website URL in the General setting is set to HTTPS. Below is a screenshot for reference.

See how to Fix Mixed Content Error in WordPress HTTPS setting

Third Step:

Since you don’t want to leave any stone unturned, why not force all URLs including the Admin login to HTTPS.

Locate your .htaccess file in root folder of the website folder and add the code below:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

For your Admin login pages you can do this by editing your wp-config.php file. This file can be found in your root folder of the website directory. Download the file on your computer local drive and open in notepad or any other editor to edit the php file. Just add the below code in the start at <?php.

define (‘FORCE_SSL_ADMIN’, true);
define(‘FORCE_SSL_LOGIN’, true);

fix Mixed Content Errors

Fourth Step:

This step is for those people who are using Cloudflare CDN services for their website. Login to your CloudFlare account, select your site and go to Cryto section from the tab. Make sure your SSL is atleast selected as “Flexible” and Scroll down below and enable the Automatic HTTPS Rewrites.

cloudflare mixed content setting

Selected Strict full SLL in Cloudflare may throw error, so be slow and choose wisely depending on your hosting capabilities.


If your website is still having issues with Mixed Content, you can try these two plugins:

1. SSL Insecure Content Fixer

2. Really Simple SSL

We hope your our post was able to help you out to solve the Mixed Content Errors on your WordPress site. If your want to check that your site is working file you can click here to check it out.

Make sure that you clear your website cache before testing.


 

media bloopers Weatherman gone with the wind on Live TV

Weatherman gone with the wind on Live TV

Kylie Jenner named her daughter Stormi

Kylie Jenner named her daughter Stormi, her first picture is most liked ever