How to fix mixed content warnings in WordPress (in 3 steps)
If you’ve gotten a mixed content warning in your WordPress, it’s important that you resolve it as soon as possible. In addition to making your website look untrustworthy to your users, these errors can also damage user experience and SEO.
Let’s take a look at how to fix WordPress mixed content warnings in three steps:
Confirm that you are using a valid SSL certificate
The SSL certificate is essential for your web site, you can create one from your admin panel very easily. However, it is also important that you make sure that it is valid and updated at all times, although Let’s Encrypt certificates have a default expiration of ninety days, if you are subscribed to our hosting do not worry because it is renewed automatically. You do not need to renew yours regularly to keep it working properly.
Therefore, unless you have recently implemented an SSL certificate on your website, there is a chance that it is expired. While this probably isn’t the cause of WordPress mixed content warnings, it’s worth a look.
To find out the status of your SSL certificate, click on the information icon that appears where the padlock should be in the address bar of your browser. Then select Certificate (Valid):
In the Certificate Viewer that opens, you can review details and information about your SSL certificate. This includes issuance and maturity dates:
Verify that your certificate has not expired. If so, check with your hosting provider, if you are a customer of ours you know that you are to create a ticket to solve it.
Install an SSL certificate if you do not have one
We will give you the steps to follow at our hosting, but it is a pretty standard procedure for everyone:
- Inside the hosting account that has the problem and look for the SSL icon.
- Once inside click on “Activate free SSL”.
- The system will confirm the request telling you that you must wait 30 minutes for it to replicate to the load balancers.
- Optionally, we recommend you to activate the option “force HTTPS enabled”, so any url written in HTTP will be changed at the server level, we leave you a video of the options mentioned:
Change WordPress internal URLs from HTTP to HTTPS
If you are still getting these mixed content warnings on your WordPress even after having a valid SSL certificate, it is possible that the integration is not configured correctly for HTTPS encryption or that you are simply calling the URL in a non-secure way, let’s go from the general to the specific first.
For them follow the following steps to change your internal URLs from HTTP to HTTPS in your WordPress, for this we will follow these steps:
- Log in to your WordPress control panel.
- Go to Settings, then General
- In the text fields, next to WordPress Address and Site Address, replace HTTP with HTTPS if necessary and save the settings, as you will see in the video:
Once saved all the URLs of your website should be sent under HTTPS, however users accessing the WEB typing HTTP will have the same problem, ask your hosting provider about how to create an automatic redirect from HTTP to HTTPS, if you host with us you have it in the administration panel or you can open a task.
Perform a search and replace to update links in your content and in your database
The next step is to update the links in your WordPress database and content to replace any instances of HTTP with HTTPS. The most efficient way to do this is to use a plugin like Better Search Replace, I leave a video tutorial and its steps explained below:
Once installed the plugin we go to Tools-> Better Search Replace in the first option “Search for or search for” we put our domain with http (http://yourdomain.com) and in the field “Replace With” we will put the HTTPS version (https://yourdomain.com).
Select all the tables of your wordpress database and uncheck the third option “Run as dry? o Do you want to run “dry”?“.
When you are finished, click the “Run Search and replace” button at the bottom of the screen. Once this is done, clear your browser cache and you should be ready, remember that if you have the +Support or plan you can open a support ticket to solve this or more doubts.