Free WordPress Cache Enabler Plugin

By Cody Arsenault
Updated on January 4, 2021
Free WordPress Cache Enabler Plugin

The WordPress community is very important to us here at KeyCDN, which is why we created a caching plugin called Cache Enabler. It's a lightweight caching plugin for WordPress that makes your website faster by generating static HTML files. Cache Enabler supports converting inline image URLs to WebP and pre-compressing cached pages with Gzip.

Why KeyCDN created Cache Enabler

Web performance is something we obsess over and we believe that every millisecond counts when reducing site load time. The default way of delivering a page in WordPress requires the entire WordPress core, plugins if installed, and database queries. These can be slow and consume unnecessary server resources. To fix this caching can be implemented, which is where Cache Enabler came to be. While there were several other caching plugins that existed we found that many were overly complex or cost money and we wanted something lightweight and free. This is one of the ways that we can give back to the open source community.

WordPress Cache Enabler features

The WordPress Cache Enabler plugin creates static HTML files and stores them on a server's disk. The web server then delivers the accepted static HTML file, avoiding any resource intensive backend processes. This in turn increases the speed of a WordPress site.

  • Fast and efficient cache engine
  • Automatic smart cache clearing
  • Manual cache clearing
  • WP-CLI cache clearing
  • Cache expiry
  • Cache size display in the WordPress dashboard
  • Minification of HTML excluding or including inline CSS and JavaScript
  • WordPress multisite network support
  • WebP support (convert images to WebP with Optimus)
  • Gzip pre-compression support
  • Custom post type support
  • 304 Not Modified support
  • Works perfectly with Autoptimize and the majority of third party plugins

WebP format

To take advantage of Google's WebP format Cache Enabler allows you to serve WebP images to supported browsers. We are excited to be the very first plugin in the WordPress community to offer WebP support without the use of JavaScript. Images can be converted to WebP with our Optimus plugin. Our Optimus plugin can compress JPG and PNG images and then also convert them to WebP.

WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs.

Several big names are already using and experimenting with WebP, such as Facebook, Google, eBay, and Netflix. Smashing Magazine also just recently decided to implement WebP on their website. Over the last five years WebP support has significantly grown with the majority of browsers having WebP support.

JPG to WebP test

We ran a test with five large JPG images to demonstrate how much compression actually takes place and the significant size difference between .jpg and .webp files. We are using lossless compression with Optimus to optimize the images and also convert to WebP upon upload to the media library. Cache Enabler then delivers WebP images based on browser support.

ImageFile nameOriginal sizeCompressed JPGWebP formatSize difference
jpg-to-webp-1.jpg480 KB407 KB43 KB89%
jpg-to-webp-2.jpg659 KB578 KB113 KB80%
jpg-to-webp-3.jpg787 KB715 KB127 KB82%
jpg-to-webp-4.jpg617 KB543 KB61 KB88%
jpg-to-webp-5.jpg605 KB543 KB70 KB87%

We then ran a page comparison test with GTmetrix, JPG vs WebP, and you can see the total difference in page size. WebP resulted in a 77% decrease in page size.

Normally we recommend scaling down your images before uploading them to WordPress, but we wanted to show you as aggressive compression tests as possible.

PNG to WebP test

We then ran a test with five large PNG images to demonstrate how much compression actually takes place and the significant size difference between .png and .webp files. We are using lossless compression with Optimus to optimize the images and also convert to WebP upon upload to the media library. Cache Enabler then delivers WebP images based on browser support.

ImageFile nameOriginal sizeCompressed JPGWebP formatSize difference
png-to-webp-1.png840 KB790 KB544 KB31%
png-to-webp-2.png903 KB873 KB638 KB26%
png-to-webp-3.png630 KB613 KB414 KB32%
png-to-webp-4.png629 KB606 KB461 KB23%
png-to-webp-5.png959 KB944 KB655 KB30%

We then ran a page comparison test with GTmetrix, PNG vs WebP, and you can see the total difference in page size. WebP resulted in a 27% decrease in page size. These numbers correspond directly with Google's reported 26% average.

Again normally we recommend scaling down your images before uploading them to WordPress, but we wanted to show you as aggressive compression tests as possible.

Install and setup Cache Enabler

You can download Cache Enabler from the WordPress repository or install it from within your WordPress dashboard.

  1. In your WordPress dashboard click Plugins and then Add New.
  2. Search for Cache Enabler on click Install Now. After the plugin has been installed activate the plugin.
  3. On the left-hand side of your dashboard click Settings and then Cache Enabler.
  4. You can now optionally configure the following settings:

Verify cache

The WordPress Cache Enabler plugin has the ability to create two separate static HTML files, the default and WebP version. Both static HTML files can then be pre-compressed with Gzip. To verify if your pages are being cached and delivered you can simply look at the source code of your page. At the bottom, you will see an HTML comment added by Cache Enabler that contains the timestamp that the page was created and the cache variant (e.g. HTTP/HTTPS, WebP, and Gzip):

<!-- Cache Enabler by KeyCDN @ 08.12.2020 17:32:29 (https webp gzip) -->

Advanced features

A more advanced feature can be implemented to bypass PHP entirely by allowing the server itself to deliver the static HTML files. You can read more about this in our Cache Enabler documentation.

Clearing cache

Cache Enabler has automatic smart cache clearing, which means by default it will automatically clear pages when they are updated. However, there are multiple ways to manually clear the cache when needed:

  1. In the WordPress admin bar there are three possible clear cache buttons: Clear Network Cache (if in network dashboard), Clear Site Cache, and Clear Page Cache.
  2. From the command line with WP-CLI.
  3. In the settings page the "Save Changes and Clear Site Cache" button will save any changes made in addition to clearing the site cache.

Summary

Let us know what you think of Cache Enabler in the comments below. From caching to disk, pre-compression, and delivering WebP images, you can see drastic speed improvements without a complex setup. Combined with our other plugins, CDN Enabler and Optimus, we hope to further speed up your content delivery in WordPress!

  • Share

Supercharge your content delivery 🚀

Try KeyCDN with a free 14 day trial, no credit card required.

Get started

Comments

Comment policy: Comments are welcomed and encouraged. However, all comments are manually moderated and those deemed to be spam or solely promotional in nature will be deleted.
  • **bold**
  • `code`
  • ```block```
KeyCDN uses cookies to make its website easier to use. Learn more about cookies.