Detect and fix mixed content on WordPress websites: With Better Search Replace

Category(ies): Wordpress
Published on 11.11.2023
Web Designer

What you can expect in this article:

In this blog post, I'll show you how to quickly and easily identify and fix the famous mixed content error on your WordPress website.
Christian Strasser Webdesigner

About the author:

Christian is a web designer & developer with over 8 years of experience in WordPress and web development. He develops conversion-optimized websites & online stores that perfectly combine design and function to make companies successful online. In addition to his work, he travels around the world and is inspired by new impressions.

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 ...".

Mixed content error message

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.

  1. 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.
  2. Installation and activation of Better Search Replace: Navigate to the plugin directory, search for the plugin, install and activate it.
  3. Perform a test run: Switch to the tool via Tools - Better Search Replace and enter the following:
    Better Search Replace details
    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.
    Better Search Replace test run
  4. 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.
    Better Search Replace result

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.

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

en_USEN
Christian Strasser

Christian Strasser

On working days I reply within a few hours.

On working days I usually reply within a few hours.

Christian Strasser
Hi 👋 
please leave me a message.

I will get back to you as soon as possible.

Best regards,
Christian
Whatsapp

Data protection consent