Eliminate Google Fonts in WordPress

Here are a few tips on how to remove Google Fonts from some well-known plugins and themes or load them directly from your server.

Google Fonts can still be used, but they must not be loaded from the Google server, since accessing the assets causes various user data (e.g. IP address) to be transferred to Google servers, which Google processes for internal purposes can be, which in turn is not GDPR compliant.

Therefore, the fonts must be hosted on your own server or on a CDN. There are now also various WordPress plugins that can be used to remove Google Fonts or integrate them locally. From our point of view, you should not install any additional plugins if it is not absolutely necessary and if you can solve problems yourself with a few clicks or a few lines of code. Each plugin causes additional workload and can slow down performance.

It should also be noted that the fonts are not updated on their own server. This means that if a font on Google Fonts receives an update and is optimized for better display, this will not be adopted for the font on its own server. It is recommended to update the font from time to time.

Let us help you with website management

Want help with website management?

Get started in just a few minutes and let SYSSY monitor your websites. Whether it's availability, security checks, performance, SEO or GDPR - SYSSY keeps track of everything for you and notifies you in the event of problems.

Test now for free


Google Webfont Helper

With the help of the Google Webfonts Helper, you can download the desired Google fonts and copy the CSS for integrating the fonts. The font files and the CSS can then be uploaded directly to your own server.

This is usually not enough, because many plugins and themes use Google Fonts, especially with WordPress. With some plugins there is an option to disable the fonts, but this can sometimes be difficult to find. With other plugins, the integration of the fonts must be deactivated using code snippets. For a few common plugins, we provide instructions here on how to disable Google Fonts.


Popup Maker

Google Fonts can be deactivated in the settings of the "Popup Maker" plugin.

To do this, go to "Settings" -> "Misc" -> "Assets" and tick "Don't Load Google Fonts".


MailPoet

MailPoet integrates Google Fonts with the registration form.

With the following code snippet, which is integrated into the functions.php of the current one, you can prevent the fonts from loading:

add_filter('mailpoet_display_custom_fonts', function () {return false;});


Slider Revolution

The slider integrates the Google fonts that you have selected when using text in the slider.

To integrate the Google fonts locally and not to load Google, go to the "Globals" menu item under the "Slider Revolution" item. There is an area for "Fonts". Select "Cache Fonts Local" from the "Enable Google Fonts download" list. Then click "Update Preload Fonts" and save the settings.

If you have installed a caching plugin, delete the entire page cache again.


Avada Theme

The Avada Theme also integrates the Google Fonts that you want to use. To load the fonts locally, go to "Avada" -> "Options" -> "Privacy" in WordPress. There you will find the item "Google & Font Awesome Fonts Mode". Switch from "CDN" to "Local" here.

Clear the cache again and you're done.


Use of the plugin Autoptimize

The "Autoptimize" plugin offers the option of blocking Google Fonts. However, this only works to a limited extent, for example the Google Fonts from Elementor are not blocked.

To block the font from loading, go to "Settings" -> "Autoptimize" -> "Extra" and select the radio button "Remove Google Fonts" in the Google Fonts area.


Manuelles Entfernen aus dem Theme

If the theme used integrates Google Fonts and there is no way to deactivate the fonts in the WordPress backend, manual intervention is required.

The best thing to do is download the theme and search through all the files for specific keywords, e.g. fonts.googleapis.com.

The fonts are then integrated like this, for example, but the type of integration can differ:

wp_register_style('theme-google-fonts', 'https://fonts.googleapis.com/css2?family=Public+Sans:wght@200;500;600&display=swap');

Such integrations can be disabled by adding the following code to a child theme in functions.php:

function mytheme_remove_google_fonts() {
    wp_dequeue_style('theme-google-fonts');
    wp_deregister_style('theme-google-fonts');
}

add_action('wp_enqueue_scripts', 'mytheme_remove_google_fonts', 100);

The important thing is that the bold part of wp_register_style() here is exactly the same in wp_dequeue_style() and wp_deregister_style().

It is also possible that the fonts are integrated via a style sheet. Then the integration takes place via a style sheet, e.g. in style.css and looks something like this:

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');

Commenting out with the help of /* */ in the style sheet is enough to remove the font.

/*
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap');
*/


Use of Google ReCaptcha

Caution is also required when using Google ReCaptcha, which is often used with form plugins. On the one hand, ReCaptcha integrates Google Fonts and, on the other hand, loads data from Google itself (and sends some back). Therefore, Google ReCaptcha should generally be avoided.


Check your website for Google Fonts

You want to check whether Google Fonts have been successfully removed from your website?
SYSSY reviews your website for Google Fonts and other services.

Register now for free and check your website


You might also be interested in this

Why TYPO3 Monitoring is important

Regular TYPO3 monitoring provides a good overview and enables you to react quickly to problems and security gaps.

This article explains what the…

Read more

Data protection-compliant tracking of website visitors without a cookie banner?

Yes, that's possible! You can find out which tool can be used to…

Read more

We have investigated a hacked WordPress website and tried to find out what happened.

How to track down the hack and the conclusions drawn from it you…

Read more