How to disable Google Fonts in WordPress?

Did you know that most WordPress themes rely on Google Fonts? Google Fonts is Google´s font embedding service library, that website operators use to benefit from beautiful fonts. However, the usage of Google Fonts in WordPress is problematic in terms of privacy, especially under the GDPR. I wrote a tutorial on how to disable Google Fonts from the WordPress theme code.

What is the problem with Google Fonts?

Every website that relies on Google Fonts connects with Google servers with every site request. In other words, a website operator is sending personal data to a processor who is not in the EU, namely in the US, and who might be performing profiling. This requires a legitimate legal basis and may result in liability claims. Some argue the usage of Google Fonts is based on the ground of legitimate interest (Art. 6 (1) (f) GDPR), others argue that you may need to ask for consent from a visitor (Art. 6 (1) (a), 7 (1) GDPR), in the case that Google is logging personal data.

On its developer page Google raises the question: “What does using the Google Fonts API mean for the privacy of my users?” whereas Google´s Privacy Policy does not mention Google Fonts.

Google Fonts API is designed to limit the collection, storage, and use of end-user data to only what is needed to serve fonts efficiently. […] Requests to the Google Fonts API are made to resource-specific domains, such as fonts.googleapis.com or fonts.gstatic.com. This means your font requests are separate from and don’t contain any credentials you send to google.com while using other Google services that are authenticated, such as Gmail. […] To learn more about the information Google collects and how it is used and secured, see Google’s Privacy Policy. (Developer)

From a practical point of view, it is advisable to avoid using Google Fonts. This frees your site not only from unnecessary third-party resources, but also makes it faster. This increases the privacy level of your visitors and reduces the liability risk of potential violations of the GDPR.

How to disable Google Fonts in WordPress?

There are at least two possibilities, how to disable Google Fonts from your theme in WordPress.

(1) Use a WordPress Plugin to remove Google Fonts

The first option, is easy, but adds additional code to your website. Go to your WordPress Dashbord and install a plugin like “Disable and Remove Google Fonts.” I prefer the second option, because additional plugins can be a security risk, if they are not regularly updated.

(2) Modify the footer.php of your WordPress theme

The second option includes the modification of the “functions.php“-file. Therefore, you need to log-in to your webhosting account and find the file in the “wp-content” folder under “themes.”

wp-content => themes => [Theme Name] => functions.php

In the “functions.php” file you search for “Fonts” and delete the text that includes Google Fonts.

(3) Example: Disable Google fonts in Wisteria theme

Personally i use the Wisteria theme in WordPress. Unfortunately this theme relies on Google Fonts. Before i modified the footer.php, my website connected with the following ressources:

mischatech.de
fonts.googleapis.com
google.com
gstaticadssl.l.google.com
fonts.gstatic.com
gstatic.com

In the footer.php i deleted the following code to disable Google Fonts in the WordPress theme.

// Fonts
	wp_enqueue_style( 'wisteria-fonts', wisteria_fonts_url(), array(), null );

Now my website only connects with mischatech.de. Privacy in the surveillance capitalism age.


Picture: https://pixabay.com/de/vectors/google-logo-schatten-1088004/

Leave a Reply

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