Mixed content is a common problem on WordPress websites. It occurs when an HTTPS-secured website (encryption via SSL certificate) loads content from HTTP sources. This can lead to incorrect displays, content not loading and security warnings in browsers, which is not necessarily conducive to visitor confidence.
In this post, I'll explain how you can use mixed content on your WordPress website. recognize and with the Better Search Replace plugin quickly and easily.
Recognizing mixed content on your website
Developer tools console
Mixed content can occur in two forms: active (e.g. scripts, stylesheets) and passive (e.g. images, videos).
You can recognize it by using the console of your browser's developer tools (right-click on the page, then "Examine" and "Console"). Warnings are displayed there that indicate mixed content: "Mixed Content: The page at https://beispiel.com was loaded over HTTPS, but requested an insecure ...".
In this example, it is a font that is not displayed with mixed content, but the website uses the (fallback) standard font.
SSL certificate in the browser
You can also recognize mixed content by the lock to the left of the URL in the browser. There it shows you the security status of your website. Among other things, the status of your SSL certificate or even information if there are security problems.
Fixing mixed content on your WordPress website
Fixing the error is super easy in principle. If you know how 😉 And that's exactly what I'm going to show you now.
I recommend that you use the plugin Better Search Replace. The plugin allows you to browse and change all elements of your website. This makes the tool super helpful, but it can also ruin a lot of things if used incorrectly. So you should know what you're doing. Don't worry, you'll know after the next section.
- Check WordPress settings: First make sure that https is configured in the URL in the settings of your WordPress website. Under Settings - General, https must be stored in the URL. If only http is specified there, change it to https. Attention: You should be sure that you have activated a valid SSL certificate for your domain. However, we assume this is the case, as you will receive the mixed content error.
- Installation and activation of Better Search Replace: Navigate to the plugin directory, search for the plugin, install and activate it.
- Perform a test run: Switch to the tool via Tools - Better Search Replace and enter the following:
You can select all the tables by first selecting any table and then pressing CTRL + A (Windows) or CMD + A (Mac). Then select "Perform as test run" and start it by clicking on the "Start search/replace" button, after which you will receive a brief overview of what Better Search Replace would have found.
- Run Better Search Replace without a test: If the result seems realistic to you, start the run as just described, only without the checkmark next to "Run as test run" and you will receive the same message, only without the test run and the actual number of changes made.
All URLs should then be correctly linked with https and accessible.
Prevention of mixed content
The safest way to prevent mixed content is to set up the SSL certificate immediately and change the URL in the WordPress settings to "https" after installing WordPress. This way you work exclusively with https encryption right from the start and prevent mixed content.
Conclusion on mixed content on WordPress websites
As you can see, there is no need to panic if you discover the "Mixed Content" error message. The problem can be solved quickly and easily if you know how and use the right tool.
0 Comments