CAOS for Webfonts | Host Google Fonts Locally


CAOS for Webfonts is written with performance in mind. Other plugins make repeated requests to your Blog’s database to replace/remove requests to external Webfonts source (e.g. Google Fonts) on-the-fly. This might be user-friendly, but it’s a performance killer, because locally hosting your Google Webfonts should be a set-and-forget feature. The source of your webfonts should be replaced once and kept that way.

That’s why I kept CAOS for Webfonts small and useful. It uses the Google Fonts Helper API to automagically download the fonts you want to WordPress’ contents folder and generate a stylesheet for it. The stylesheet is automatically included to your site’s header and 100% compatible with plugins like Autoptimize or W3 Total Cache. After that, all you need to do is remove any mention of requests to external webfont sources (using e.g. a child theme) and you’re done!

This will decrease your pageload times, leverage browser cache, minimize DNS requests and effectively bring you a perfect score on Pagespeed Insights and Pingdom, without taking toll on the performance of your webserver.


  1. Upload the plugin files to the /wp-content/plugins/host-webfonts-local directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the ‚Plugins’ screen in WordPress
  3. Use the Settings -> Optimize Webfonts screen to configure the plugin


How come my font isn’t available in CAOS for Webfonts?

This could be for several reasons:
1. Have you checked if your font is available on Google Fonts?
1. Is your font listed as an open source font, or is it a premium font? For obvious reasons, CAOS for Webfonts only has access to open source fonts.

Does this plugin edit template files?

No, it does not. It creates a CSS Stylesheet which should be added to your theme’s header.

My fonts aren’t being downloaded! What’s going on?

First check your database if the table {prefix}_caos_webfonts exists. If you’re using any caching plugins, such as Autoptimize, W3TC or WP Super Cache, empty their caches. After that empty your browser’s cache and reload the page. Try again.

The stylesheet isn’t loaded? What’s going on?

CAOS for Webfonts enqueues the stylesheet into WordPress’ head. If the stylesheet isn’t loaded, this probably means your theme isn’t implementing the wp_head() function into it’s header section.

Does this plugin support Multi Site?

Yes, it does!

Can I buy you a beer?

Yes, please! Click here to buy me a beer!


Very well done!

I like this a lot, it is very easy to use and just works. Autoptimize does it's job to remove the Google Fonts and in conjunction with this plugin they are the perfect dream team to get your Google fonts hosted locally in just a few seconds! Thank you for this nice plugin.

Highly recommend, improved pagespeed score significantly

This plugin does exactly as promised, in a simple user friendly way. All I had to do was download my fonts from google as instructed. Once download onto my computer I converted them using font squirrel as instructed, and downloaded the zip file. I went onto wordpress > settings > optimize webfonts. Hit the select font button, you will want to unzip the webfontkit and upload the generator_config.txt and select it. Then simple click add stylesheet. It should be noted that I am very new to website building, and I have zero programming knowledge but I could still use this plugin to significantly improve my pagespeed, and pingdom scores. ***I did have better luck uploading the generator_config.txt file on wordpress through Media > Add New. I kept receiving HTTP errors inside the wordpress uploader when trying to upload via the plugin.***
Przeczytaj 5 recenzji

Kontrybutorzy i deweloperzy

„CAOS for Webfonts | Host Google Fonts Locally” jest oprogramowaniem open source. Poniższe osoby miały wkład w rozwój wtyczki.


Log zmian


Added a clean-up button, which cleans the currently configured cache-dir.


Plugins admin-JS and -CSS is now updated by force after plugin update to prevent malfunction.


Added a download counter, clean queue-button and improved allround UX. Fixed a few minor bugs.


Fixed a bug where sometimes the fonts weren’t downloaded yet when the stylesheet was generated.


CAOS for Webfonts now remembers which fonts you use, to make it easier to edit your stylesheet.


Added option to change font-display strategy.


Added option to change cache directory.


Fixed bug with detecting wp-content directory.


Fixed Multisite Bug.


Revert accidental commit


Tested with WP 5+


Changed order of loaded fonts to improve compatibility in Firefox. [Reported by @lofesa]


When plugin is deactivated, enqueued styles and scripts are removed. Fixed bug where fontnames containing multiple spaces did not return any results. Added console log when no results are returned.


Finally added ‚Settings’-link to Plugins-page.


Further security measures to remove Path Traversal vulnerabilities.


Added security measures to prevent XSS.


Fixed bug where ‚remove’ would sometimes remove two rows.


Complete overhaul of the plugin. Fonts are now searched using the Google Fonts Helper API and


Fixed bug where the plugin would sometimes permanently change your uploads-directory to /local-fonts.


Changed to Github.


First release! No changes so far!