How to Host Google Fonts Locally in WordPress (GDPR)
Hosting Google Fonts locally in WordPress means serving the font files from your own domain instead of fonts.googleapis.com, which removes the request to Google and gives you control over preloading and subsetting.
When your site loads a font from fonts.googleapis.com, every visitor’s browser connects to Google and sends it their IP address. In the EU that has been a real legal risk since a German court (Landgericht München I, judgment of 20 January 2022, case 3 O 17493/20) ruled that embedding Google Fonts this way, without consent, breaks the GDPR. The fix is simple: host the font files on your own server. It’s often faster too, because the browser doesn’t need to open a connection to another domain.
This guide covers three ways to do it, and how to check that no request goes to Google any more. It is not legal advice.
Why host fonts locally?
- No request to Google. The Munich ruling was about the visitor’s IP address being sent to Google without consent. Local files remove that request.
- One fewer connection. The browser doesn’t have to connect to a second domain before it can show text.
- Control. You decide which weights and character sets exist, what is preloaded, and how
font-displaybehaves.
Self-hosting a font is not the same as putting Google’s stylesheet link in your theme. The ruling was about the request to Google, and only local files remove that request.
Step 1: find out where Google Fonts come from
Before changing anything, see what your site loads today. Open your site in Chrome, press F12, go to the Network tab, reload the page and type fonts in the filter. Any request to fonts.googleapis.com or fonts.gstatic.com is a font loaded from Google.
Common sources:
- the theme (many themes enqueue Google Fonts by default),
- the page builder (Elementor, for example, loads Google Fonts for its typography settings),
- plugins such as sliders or form builders.
Note which fonts and weights appear. You’ll need the same ones locally.
Which method should you use?
| Method | Works with | Covers fonts loaded by plugins and builders? |
|---|---|---|
| Font Library (WordPress 6.5+) | Block themes | No, only the theme’s fonts |
| Your builder’s font settings | That builder | No, only the builder’s own fonts |
| A font manager plugin | Any theme or builder | Yes, if it also blocks the remaining Google requests |
@font-face by hand | Any theme | No, you dequeue each Google stylesheet yourself |
Option 1: by hand
- Download the font files. google-webfonts-helper lets you pick a font, the weights and the character sets, and gives you
.woff2files plus ready-made CSS. - Upload the files to your child theme, for example
wp-content/themes/your-child-theme/fonts/. - Add the
@font-facerules to your stylesheet:
@font-face {
font-family: "Inter";
src: url("fonts/inter-v13-latin-regular.woff2") format("woff2");
font-weight: 400;
font-style: normal;
font-display: swap;
}
- Stop the original Google request. If your theme enqueues it, dequeue the stylesheet by its handle (you can find the handle in the
idof the<link>tag in the page source, without the-cssending):
add_action( 'wp_enqueue_scripts', function () {
wp_dequeue_style( 'theme-google-fonts' ); // replace with the real handle
}, 100 );
This works, but you repeat it for every font and weight, and a theme or builder update can bring the Google request back.
Option 2: block themes (WordPress 6.5+)
Since WordPress 6.5, the Font Library in the Site Editor can install Google Fonts. Go to Appearance → Editor → Styles → Typography, manage fonts and install from Google Fonts. WordPress downloads the files to your server and serves them locally. This covers fonts used by the block theme, but not fonts loaded by plugins or page builders.
Option 3: with Font Hero
Font Hero is the font manager we build at DPlugins, developed by Marko Krstić. It imports Google Fonts, stores them on your server and manages how they load, for any theme or builder (Register Google Font).
- Go to Font Hero → Fonts → Add Font → Google Font.
- Search for the font and open its import options.
- Pick only the variants you use (for example 400, 400 italic and 700).
- Pick only the subsets you need. An English site only needs Latin, and the Latin subset is a much smaller file than the full font.
- Choose the font display setting and click Import.
Font Hero downloads the files to /wp-content/uploads/font-hero/google-fonts/. Then go to Font Hero → Settings and turn on Disable Google Fonts, so the theme or plugins can’t keep requesting fonts from Google. If you use Elementor, also turn on the Elementor-specific Disable Google Fonts setting.
Step 2: check that it worked
Clear your caches, open the site in a private window and repeat the Network check. Filter by fonts.g: there should be no requests to fonts.googleapis.com or fonts.gstatic.com. Your fonts should now load from your own domain. If you use a page builder, repeat the check inside the builder’s editor, which can load fonts of its own.
Only import the weights and character sets you actually use. Every extra variant is another file the browser has to download.
Variable fonts
A variable font puts every weight in one file. That is one request instead of several, but the file is larger than a single static weight, so it pays off when you use several weights. See how to use variable fonts in WordPress and how to reduce font load.
FAQ
Is using Google Fonts illegal in the EU?
Not as such. In the Munich case, the court found that sending a visitor’s IP address to Google without consent was unlawful. Hosting the files yourself avoids that transfer. For your own situation, ask a lawyer.
Does WordPress have a built-in way to host fonts locally?
Yes, for block themes: the Font Library, since WordPress 6.5. Classic themes need theme code or a plugin.
Do local fonts make a site faster?
They remove a connection to a third-party domain. How much that helps depends on the site, so measure before and after with Lighthouse.
Sources
- LG München I, judgment of 20 January 2022, case 3 O 17493/20, Bayern.Recht (read 2 October 2026)
- WordPress 6.5 “Regina”, WordPress.org News, 2 April 2024: the Font Library (read 2 October 2026)
- Register Google Font, Font Hero documentation (read 2 October 2026)
Tested with WordPress 7.1.2: the dequeue snippet in Option 1.
Related guides
- How to Use Adobe Fonts (Typekit) in WordPress: Premium Typekit fonts on your WordPress site.
- Font Pairing and Font Stacks for WordPress Sites: Fonts that work together, with fallbacks that look right.
- Convert variable fonts for Oxygen Builder: Turn a variable font into files Oxygen can use.
Browse all WordPress tutorials.
