CAOS for Webfonts | Host Google Fonts Locally

Description

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.

Installation

  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

FAQ

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.

Can I buy you a beer?

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

Reviews

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.***

Read all 3 reviews

Contributors & Developers

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

Contributors

Changelog

1.3.6

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

1.3.5

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.

1.3.2

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

1.3.1

Further security measures to remove Path Traversal vulnerabilities.

1.2.9

Added security measures to prevent XSS.

1.2.8

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

1.2.5

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

1.1.0

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

1.0.1

Changed to Github.

1.0

First release! No changes so far!