Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure font '<URL>'

I migrated my Wordpress site to HTTPS, everything works but I've theses errors. In my CSS, I import fonts and I tried to put theses URLs with HTTPS but it changes nothing. I verified and my link to Google fonts is secure. Any ideas?

Topic import https ssl Wordpress

Category Web


For me, the minified css was the cause, not a database entry. I had to follow the second step of this (the first one doesn't apply for the current Divi theme):

Navigate to the ‘Divi’ menu in the left menu bar in the WordPress admin area and press ‘Theme options’. Then navigate to the ‘Builder’ tab. Select ‘Advanced’ and uncheck the ‘Static File Generation’ option. Finally, press ‘Clear’ to clear the Divi cache.


A link to the website would be useful.

However, here is a small check list for you to consider:

  1. Take a full backup (database and static website files)
  2. Go to WP admin panel and choose Settings/General, then change the WordPress Address (URL)and Site Address (URL) to https
  3. Download a plugin Better Search and Replace and look for http:// and replace it to https://
  4. Manually inspect your website theme files like header.php, footer.php, functions.php, and other *.php, *.css, *.js files do a check by pressing cmd+F(MacOS) or ctrl+F(Win) and doing a search for http:// and replace these to // or https://
  5. Clear cache and test if some of the pages have mixed content open the source code and cmd+F(MacOS) or ctrl+F(Win) to search for http:// - you will find the cause

When migrating a site to Https, I do the following:

  1. Change the WordPress URL and Site Address to https
  2. Use Better Search and Replace plugin to scan the whole site and update http://example.com to https://example.com
  3. I then test various page to see if the theme stores the link in a way that required manual update.
  4. Clear all caches and the errors should disappear.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.