-
carby
Under Install Google Fonts there are no fonts listed and searching doesn’t list anything. This is still working on a staging website but when I moved the website to the live location it stopped working.
Adding Google fonts in the Customizer does work. -
George
Hello there,
Are your existing fonts shown on the live site after the migration? Can you disable the existing fonts one by one while saving in between, then re enable them and save again?
-
I uploaded the Google font files and enabled them that way. The only thing that doesn’t work is viewing a list of Google fonts under Install Google Fonts. Maybe something is blocking access.
-
George
Hi,
A few things to check on the live site:
- Any security plugin or firewall (including a host-level WAF or Cloudflare) that might block outbound requests to googleapis.com
- Whether your host blocks external HTTP requests from the server
- Your
wp-config.phpfor a line likedefine( 'WP_HTTP_BLOCK_EXTERNAL', true );— if that’s set, it blocks the API call
Since staging worked and live doesn’t, the difference is likely at the server/host level rather than in WordPress itself. Your host can confirm whether outbound requests to Google are being blocked.
-
carby
I will check the things you mentioned. I included the access log details.
-
George
Thanks — that access log is helpful. The important part is that the request to
/wp-json/wp/v2/font-collections/google-fontsis returning a 500 error, which means something is failing server-side when WordPress tries to build the Google font list, rather than just an empty response.To find the cause, could you grab the corresponding entry from your PHP error log (not the access log) for that same timestamp? That will show the actual fatal error or warning behind the 500.
A couple of things that commonly cause this:
- The server can’t reach Google’s Fonts API (a blocked outbound request throwing an error). You can check Tools → Site Health → Info → look for failing loopback/HTTP request results.
- A memory limit being hit while processing the font collection — the PHP log will show this if so.
The PHP error log entry will tell us which one it is.
-
carby
Wordpress debug log entry included
-
carby
I increased the memory in php settings and that fixed it.
-
George
Hi,
That’s great, glad you found the solution!
- You must be logged in to reply to this topic.