How to Host Google Fonts Locally in WordPress to Reduce Render-Blocking

How to Host Google Fonts Locally in WordPress to Reduce Render-Blocking

Google Fonts are everywhere. They are free, easy to implement, and they make the web look better than the days of Arial and Times New Roman. I use them regularly in client projects because they offer typographic variety without the cost of licensed fonts.

But there is a cost you do not pay in dollars. You pay in performance.

Every time you load a font from Google’s servers, you introduce a render-blocking resource. The browser has to stop what it is doing, connect to an external domain, download a CSS file, parse it, and then download the actual font files. All of this happens before the user can read your content.

For years, I accepted this as the price of doing business. Then I started digging into Core Web Vitals, and I realized something: hosting Google Fonts locally is not complicated, and the performance gains are substantial.

Here is exactly how to do it, why it matters, and what you need to watch out for.


Why Google Fonts Block Rendering

To understand the problem, you have to look at how Google Fonts actually load.

When you enqueue a Google Font in WordPress, you typically add a line like this to your site’s <head> section:

<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap" rel="stylesheet">

That seems innocent enough. But here is what happens next:

  1. The browser encounters this <link> tag while parsing your HTML.
  2. It stops rendering to request the CSS file from fonts.googleapis.com.
  3. Google’s server generates a CSS file that contains @font-face declarations pointing to font files on fonts.gstatic.com.
  4. The browser downloads that CSS, parses it, and then requests the actual font files (WOFF2) from fonts.gstatic.com.
  5. Only after all of this does the browser render text using your chosen font.

Even with display:swap (which the &display=swap parameter enables), you still have external requests. The text might render briefly in a fallback font, but the browser is still busy downloading fonts in the background. Those requests consume bandwidth and delay the page’s full rendering.

The term for this is render-blocking. The CSS file from Google is treated as a critical resource. The browser will not finish rendering the page until it has processed that stylesheet .


What Hosting Locally Actually Means

Hosting Google Fonts locally means downloading the font files to your own server and serving them from your own domain. Instead of linking to fonts.googleapis.com, you link to a CSS file in your wp-content directory. Instead of downloading WOFF2 files from fonts.gstatic.com, visitors download them from yourwebsite.com.

This accomplishes several things:

  • Zero external DNS lookups: The browser does not need to resolve fonts.googleapis.com or fonts.gstatic.com.
  • No extra TLS negotiations: You avoid the SSL handshake overhead with Google’s servers.
  • Render-blocking eliminated: The CSS and font files come from the same place as your other assets, and with proper optimization, they no longer block rendering.
  • Privacy compliance: No visitor data is sent to Google’s servers .

A German court ruled in 2022 that loading Google Fonts from Google’s servers violates GDPR because Google logs IP addresses for analytics purposes . If you have European visitors, local hosting is not just a performance play; it is a legal safeguard.


Method 1: The Plugin Approach (Easiest, Most Reliable)

For most site owners, the simplest path is using a plugin. I have tested several, and one stands out for its combination of automation, lightweight code, and compatibility.

EasyFonts

EasyFonts is a free plugin that does exactly one thing: it detects Google Fonts on your site, downloads them, and serves them locally. It weighs about 30KB and requires no configuration beyond activation .

Here is how it works:

  1. You install and activate the plugin.
  2. You visit your site’s front end (this triggers the detection process).
  3. The plugin scans for <link> tags, @import statements, and inline @font-face declarations that point to Google Fonts.
  4. It downloads the font files in WOFF2 format (the most efficient format, supported by 96%+ of browsers).
  5. It rewrites the URLs to point to your local server.
  6. Optionally, it removes resource hints like preconnect and dns-prefetch that were added for Google’s domains.

The result is that requests to fonts.googleapis.com and fonts.gstatic.com disappear from your network tab. They are replaced by requests to your own domain .

I installed this on a test site that used five Google Font weights across two families. Before the plugin, the site made 7 external requests for font-related assets. After activation, zero. The font files loaded in under 50ms from the local server versus 200-300ms from Google’s CDN.

Fonts Plugin

Another option is Fonts Plugin, which offers a broader feature set including Adobe Fonts integration and custom font uploads. The free version includes local Google Fonts hosting, though some advanced typography controls require the pro version .

I have used this on client sites where they wanted more typography flexibility. The local hosting works reliably, and the live customizer preview is useful for experimentation.

Divi-Specific Solutions

If you use Divi, there is a dedicated plugin called Divi – Host Google Fonts Locally. It is free, requires no configuration, and preloads cached fonts for additional performance gains .

The Divi theme is notorious for loading multiple font variations. This plugin cleans that up effectively.

Kadence Theme Built-In

If you use the Kadence Theme, you do not need a separate plugin. Kadence includes a built-in option to load Google Fonts locally. You enable it in Appearance > Customize > General > Performance. The theme fetches the fonts once, stores them locally, and serves them from your server .

Kadence also offers a “Preload Local Fonts” option, which tells the browser to fetch fonts earlier in the loading process, reducing the chance of a Flash of Unstyled Text .


Method 2: Manual Implementation (For Developers)

If you prefer not to use plugins, or if you are building a custom theme, you can host fonts manually. This gives you complete control but requires more work.

Step 1: Download the Font Files

Visit the Google Webfonts Helper tool. This site provides a clean interface for downloading any Google Font.

Select your font family, choose the styles and character sets you need, and download the package. It includes the font files in WOFF and WOFF2 formats, plus a sample CSS file.

Step 2: Upload to Your Theme

Create a folder in your theme directory called /fonts/. Upload the downloaded font files there.

Step 3: Add @font-face Declarations

In your theme’s main CSS file (or a dedicated fonts CSS file), add @font-face declarations for each font weight and style. The Google Webfonts Helper provides the exact code you need.

For Open Sans Regular, it looks something like this:

@font-face{ 
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: local('Open Sans Regular'), local('OpenSans-Regular'),
         url('/wp-content/themes/your-theme/fonts/open-sans-v18-latin-regular.woff2') format('woff2'),
         url('/wp-content/themes/your-theme/fonts/open-sans-v18-latin-regular.woff') format('woff');
 }

Step 4: Enqueue the CSS

In your theme’s functions.php file, enqueue the CSS file that contains your @font-face declarations.

function mytheme_local_fonts() {
    wp_enqueue_style( 'mytheme-fonts', get_template_directory_uri() . '/css/fonts.css', array(), '1.0.0' );
}
add_action( 'wp_enqueue_scripts', 'mytheme_local_fonts' );

Step 5: Remove the Old Google Font Enqueues

You also need to find and remove any existing Google Font enqueues. They might be in your theme’s functions.php, in a child theme, or added by plugins. Look for wp_enqueue_style calls that reference fonts.googleapis.com.

This manual approach gives you fine-grained control, but it is also harder to maintain. If you ever change fonts, you have to repeat the entire process.


The Preload Question

Once your fonts are local, you have an additional optimization opportunity: preloading.

By default, browsers discover font files relatively late in the loading process. The browser has to download the HTML, parse it, download the CSS, parse that, and then finally request fonts. Preloading tells the browser: “This file is important. Start downloading it now, even before you parse the CSS.”

In Kadence, you can enable preloading with a checkbox . In other setups, you can add preload links manually:

<link rel="preload" href="/wp-content/themes/your-theme/fonts/open-sans-v18-latin-regular.woff2" as="font" type="font/woff2" crossorigin>

Add these preload links to your site’s <head> section. Be careful, though: preloading every font weight can backfire. Preload only the fonts that are critical for above-the-fold content. Usually, that means the regular (400) weight and maybe the bold (700) weight.


Verifying It Works

After implementing local hosting, you should verify that external font requests are gone.

Open your site in Chrome, open DevTools (F12), and go to the Network tab. Reload the page and filter by “Font”. Look at the Domain column. You should see your own domain, not fonts.gstatic.com .

Next, filter by “CSS” and look for requests to fonts.googleapis.com. They should be absent.

If you still see external requests, something is still loading fonts from Google. Common culprits include:

  • Plugins that hardcode Google Fonts
  • Page builder modules with their own font settings
  • JavaScript-based font loaders like WebFontLoader

You may need to dig into your theme and plugin settings to disable external font loading at the source.


The CDN Consideration

One objection I hear is: “But Google’s CDN is faster than my server. They have global edge locations.”

This was true ten years ago. It is less true today.

First, modern WordPress hosting is fast. If you are on a decent host with server-level caching and a CDN like Cloudflare, your server can deliver fonts just as quickly as Google can.

Second, the performance gain from eliminating external requests often outweighs any CDN speed advantage. Every external request adds DNS lookup time, TLS negotiation time, and connection overhead. Serving fonts locally removes all of that.

Third, if you are already using a CDN for your site (which you should be), your local fonts are also on a CDN. Cloudflare, for example, will cache your font files at the edge. You get the best of both worlds: local control and global distribution.

For clients who invest in comprehensive WordPress speed optimization, I always recommend local fonts plus a CDN. It is the combination that delivers the fastest experience.


Legal and Privacy Implications

I mentioned GDPR earlier, but it bears repeating.

When you load fonts from Google, Google receives the IP address of every visitor to your site. They can track which sites those visitors are coming from, what pages they view, and how long they stay. This happens regardless of whether you have a Google Analytics account .

For a personal blog, you might not care. For a business with European customers, this is a problem.

Hosting fonts locally eliminates this data transfer. Your visitors’ IP addresses stay on your server (or your CDN’s servers, if you use one). No third party is involuntarily collecting data.

This is why many European agencies now require local font hosting as a standard practice. It is not just about performance; it is about respecting user privacy.


Performance Impact: What to Expect

I have run this optimization on dozens of sites. The improvements vary, but here are typical results:

  • Requests reduced: 2-7 fewer external requests per page view.
  • Bytes transferred: Similar or slightly higher (Google’s WOFF2 compression is good, but so is yours).
  • Render time: 100-300ms faster on initial page load, especially on mobile networks where latency is high.
  • Cumulative Layout Shift: Often improves because font swapping happens faster.

For a site getting 100,000 page views per month, shaving 200ms off each load saves about 5.5 hours of cumulative waiting time for your users. That is meaningful.

I have also seen PageSpeed Insights scores jump by 5-10 points solely from eliminating render-blocking external fonts. When you are competing for SEO rankings, those points matter.


Common Pitfalls and How to Avoid Them

Local font hosting is not completely without risks. Here are issues I have encountered and how to handle them.

Font Variations Missing

If you use multiple weights or styles (italic, condensed, etc.), make sure your download includes all of them. Plugins like EasyFonts handle this automatically . Manual implementations require you to download each variant separately.

CORS Issues

When you preload fonts, you need the crossorigin attribute. Without it, the browser may preload the font but then refuse to use it because of CORS policy. Always include crossorigin on font preloads.

Cache Busting

If you update your fonts, visitors might see stale versions. Plugins typically handle cache busting by versioning the CSS file. In manual implementations, you can add a version parameter to the enqueued stylesheet.

Icon Fonts

Some plugins specifically exclude icon fonts (like Font Awesome) from local hosting because they are handled differently . If you use icon fonts, check whether your local font plugin supports them.

Page Builder Conflicts

Some page builders, like Elementor and Divi, have their own font settings. If you enable local hosting but the page builder is still enqueuing Google Fonts directly, you may end up with both local and external copies. This wastes bandwidth and defeats the purpose .

Most good font plugins are tested with major page builders and handle this automatically. EasyFonts explicitly lists compatibility with Elementor, WPBakery, Divi, and others .


The Bottom Line

Google Fonts are a design asset, but they are also a performance liability. Every external request is a potential point of failure, a delay in rendering, and a privacy concern.

Hosting them locally solves all of these problems. The fonts load faster, they do not block rendering, and they keep visitor data on your own infrastructure.

For new sites I build through my custom WordPress development work, I include local font hosting as standard. It takes five minutes to set up with a plugin, and the performance gains persist for the life of the site.

If you are maintaining an existing site, spend an hour this week auditing your font loading. Open DevTools, look at the Network tab, and see how many external font requests you have. Then install a local font plugin and watch them disappear.

Your users will thank you. Google will thank you. And you will wonder why you did not do it sooner.


Need help optimizing your WordPress site for speed and Core Web Vitals? I work with site owners to implement server-level caching, local font hosting, and comprehensive performance strategies. If you are ready to move beyond plugins and into proper architecture, let’s talk about how I can help as your freelance WordPress developer.

Unknown's avatar
About Author

Adnan Buksh

I’m a freelance WordPress developer helping businesses build secure, fast, and SEO-friendly websites. I specialize in custom WordPress development, speed optimization, malware removal, and ongoing maintenance.

What My Clients Say

I’ve been trusted by business owners, startups, and professionals
who needed a reliable WordPress expert—and their feedback means everything to me.

No time to wait ? Call me ☕️ 🍞

Work With Me to Turn Your
Website Into a Lead Machine

Hire a WordPress Freelancer Developer for website development
Adnan Buksh Profile image

I’m a freelance website developer passionate about building SEO-friendly, high-performing websites that help businesses grow online.

© 2022 - 2026 WebFreelancer.
Owned & operated by Adnan Buksh. All rights reserved.
Adnan
Adnan Buksh

Online • Typically replies in minutes

Select the fields to be shown. Others will be hidden. Drag and drop to rearrange the order.
  • Image
  • SKU
  • Rating
  • Price
  • Stock
  • Availability
  • Add to cart
  • Description
  • Content
  • Weight
  • Dimensions
  • Additional information
Click outside to hide the comparison bar
Compare