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

admin2025-01-07  3

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?

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?

Share Improve this question asked Apr 23, 2019 at 9:50 user165605user165605 111 silver badge1 bronze badge 1
  • You should include what files are causing the error. – RiddleMeThis Commented Apr 23, 2019 at 13:19
Add a comment  | 

3 Answers 3

Reset to default 0

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.

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

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736252050a15.html

最新回复(0)