OMGF | Host Google Fonts Locally


OMGF (Optimize My Google Fonts, formerly known as CAOS for Webfonts) is written with performance and user-friendliness in mind, without killing performance.

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 that needs to be done is remove any requests to external Google Fonts sources (e.g. or This can be achieved using the integrated option, a child theme or a plugin such as Autoptimize.

That’s it. 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.


  • Easily find and download your fonts in multiple subsets,
  • Generate a stylesheet, which is automatically added to your header using WordPress’ wp_head()-function,
  • Change the caching path (where the fonts and stylesheet are saved) for increased compatibility with Caching- and Security-plugins, such as WP Super Cache, Autoptimize and WordFence,
  • Control font performance by adding font-display property,
  • Auto-generates the local source for webfonts,
  • Automatically remove any fonts loaded from or,
  • Prioritize fonts with rel=’preload’.


  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

For a more comprehensive guide for configuration, click here.


I don’t know what I’m doing! Can you help?

Of course šŸ™‚ But first calm down and read this comprehensive guide on how to configure OMGF. If you have any questions afterwards, visit the Support Forum.

I have another file I want to host locally. Could you make a plugin?

Maintaining two plugins besides my daily 9-to-5 job is a handful, so no. If you’re looking for a way to host analytics.js locally; please install CAOS. For anything else, please follow the steps in this how-to.

How come my font isn’t available in OMGF?

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, OMGF only has access to open source fonts.

Can I serve the fonts from my CDN?

Yes, you can. Enter the url of your CDN and re-download and re-generate the stylesheet. Then the fonts will be saved to and served from your CDN.

I’m getting a ‘Load resources from a consistent URL’ after installing and configuring this plugin. What’s going on?

This must be, because you’re still loading the externally hosted Google Fonts, besides the fonts you downloaded using OMGF. Try checking the option ‘Remove Google Fonts’ and see if that helps. If it doesn’t consider using a child theme to ‘dequeue’ any external requests. If you don’t know how to do that, consider using a plugin such as Autoptimize to optimize your CSS and remove the fonts.

Does this plugin edit template files?

No, it does not. It creates a CSS Stylesheet which will be automatically added to your theme’s header using a built-in WordPress queueing system.

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

First check your database if the table {prefix}_caos_webfonts exists. If it doesn’t, remove the caos_webfonts_db_version from the wp_options table and reload the page. The table should be created and the issue should be resolved.

If the issue still persists and 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?

OMGF 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!


August 30, 2019
Outstanding plugin........Super easy to save..........My website loads fast......A big thank you from the bottom of my heart.
August 28, 2019
The best, ignore other Google fonts plugins. Easy and intuitive will add any G font you want to your site and you'll be able to use it through usual CSS code: font-family: '<font name>'
August 17, 2019
Wow such a great Plugin. The Search and Download function is perfect. Works fine.
August 15, 2019
Iā€™m using Elementor Pro with the Hello Theme a very basic lightweight theme. Local load of Google fonts, makes the website faster. Keep in mind: only load fonts you use. Thanks!
July 31, 2019
Loading Google Fonts from your local website is a big help for speeding up a website, and doing it manually is not hard or complicated. However, by using this little gem of a plugin I save time doing the process manually and it is much faster. Much appreciated, thank you šŸ™‚
Read all 20 reviews

Contributors & Developers

“OMGF | Host Google Fonts Locally” is open source software. The following people have contributed to this plugin.




Made all strings translatable.


Changed name to OMGF, because it’s hilarious?


New feature! OMGF can now remove fonts from or automatically.


Extended support for local source attribute.


Correct support for Legacy IE browsers (EOT).
Added ‘local’-attribute to stylesheet.


Load EOT-files first in stylesheet.


Minor code optimizations.


Cleared up instructions in Welcome Panel.
Added option to remove version parameter from stylesheet request.


Updated welcome panel.


Quick-fix for re-triggered SQL queries.


XSS hardening in stylesheet generation form.


Added CDN support.


Fluid progress bar now functions correctly and doesn’t make any unnecessary Ajax-requests.
Replaced all success-messages with notifications inside the buttons, to increase UX.


Improved search by adding support for comma-separated lists. Fixed some 404s in welcome panel and minor JavaScript optimizations.


Minor usability updates.


Added support for subsets to increase compatibility with other writing.


Changed domains to new home:


Added experimental option for preload resource hint.


Replaced download counter for progress-bar. Refactored logic for AJAX-requests for better


Optimized AJAX-requests for download-counter.


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.


OMGF 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!