Free WordPress Cache Enabler Plugin

wordpress cache enabler plugin

The WordPress community is very important to us here at KeyCDN and so that is why we have launched a new caching plugin called Cache Enabler. It’s a light-weight plugin that makes your website faster by generating static HTML files, minification, and WebP support. It’s freely available and a setup can be completed within minutes.

Why KeyCDN Created Cache Enabler

The web is constantly changing and with the release of HTTP/2 the team at KeyCDN was looking for the best way to take advantage of this, and that is why Cache Enabler is entirely focused around this new protocol. While other third-party caching plugins are sometimes overly complex or cost money, we wanted something lightweight and free. A good caching plugin shouldn’t have to cost you money.

HTTP/2 – A New Approach

A lot of the options offered in third-party caching plugins actually become obsolete when you move to HTTP/2, because one of the main goals of the protocol is to reduce the marginal overhead of new requests. You should avoid domain sharding and concatenation of your assets to benefit from parallelism of HTTP/2. This will definitely be a new concept for a lot of people as these techniques have been standard optimization techniques for years. In other words, with HTTP/2 things gets simpler and faster!

Note: You must be running on HTTPs to benefit from HTTP/2 on your server, and that is why we wrote a guide on how to migrate from HTTP to HTTPS. Or use a CDN with HTTP/2 support, like KeyCDN.

WebP Format

Besides the performance benefits of HTTP/2 we also wanted to take advantage of Google’s WebP format. And so with Cache Enabler, when combined with Optimus, you can now serve up WebP images in supported browsers! We are excited to be the very first plugin in the WordPress community to offer WebP support without the use of Javascript. Our Optimus plugin compresses your JPG/PNG files and then also creates a WebP version when uploading to WordPress.

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. The WebP format is currently only supported in Google Chrome, Opera, Opera Mini, Android Browser and Chrome for Android. However as of September 2015 Chrome and Opera already have 67.3% of the browser market share, according to w3schools, so over half of your visitors would benefit from WebP. The Cache Enabler plugin then serves up PNG/JPG files to the other 32.7%.

WordPress Cache Enabler Features

The WordPress Cache Enabler plugin creates static HTML files and stores them on your servers disk. The web server will deliver the static HTML file and avoids the resource intensive backend processes (core, plugins and database). This in turn increases the speed of your WordPress site.

  • Efficient and fast disk cache engine
  • Automated and/or manual clearing of the cache
  • Manually purge the cache of specific pages
  • Display of the actual cache size in your dashboard
  • Minification of HTML and inline JavaScript
  • WordPress multisite support
  • Custom Post Type support
  • Expiry Directive
  • Translation ready
  • WebP Support (when combined with Optimus)
  • Supports responsive images via srcset in WordPress 4.4
  • HTTP/2 Focused
  • Works perfectly with Autoptimize

The plugin requires PHP >=5.3 and Wordpress >=4.1.

JPG to WebP Test

We ran a test with 5 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.

jpg-to-webp-2
jpg-to-webp-3
jpg-to-webp-4
jpg-to-webp-5

File Name Original Size Compressed JPG WebP Format Size Difference %
jpg-to-webp-1.jpg 480 KB 407 KB 43 KB 89%
jpg-to-webp-2.jpg 659 KB 578 KB 113 KB 80%
jpg-to-webp-3.jpg 787 KB 715 KB 127 KB 82%
jpg-to-webp-4.jpg 617 KB 543 KB 61 KB 88%
jpg-to-webp-5.jpg 605 KB 543 KB 70 KB 87%

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

png-to-webp-2
png-to-webp-3
png-to-webp-4
png-to-webp-5

 

File Name Original Size Compressed PNG WebP Format Size Difference %
png-to-webp-1.png 840 KB 790 KB 544 KB 31%
png-to-webp-2.png 903 KB 873 KB 638 KB 26%
png-to-webp-3.png 630 KB 613 KB 414 KB 32%
png-to-webp-4.png 629 KB 606 KB 461 KB 23%
png-to-webp-5.png 959 KB 944 KB 655 KB 30%

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

  1. In your WordPress dashboard click into “Plugins” and then into “Add New.”
  2. Search for “Cache Enabler” on click on “Install Now” and activate the plugin.
  3. On the left-hand side of your dashboard click into “Settings” and into “Cache Enabler.”
  4. You can now configure the following options:
  • Cache Expiry: Cache expiry in hours. An expiry time of 0 means that the cache never expires.
  • Cache Behavior: Disable caching if logged in.
    • Clear the complete cache if a new post has been published (instead of only the home page cache)
    • Clear the complete cache if a new comment has been posted (instead of only page specific cache)
    • Pre-compression of cached pages. Needs to be disabled if the decoding fails in the web browser.
    • Create an additional cache version for WebP image support. Convert your image to WebP with Optimus.
  • Cache Exclusions: Post or Pages IDs separated by a , that should not be cached.
  • Cache Minification: You have the option to minify HTML and HTML + Inline JS.

WordPress cache enabler settings

Verify Cache

The WordPress Cache Enabler plugin actually creates two separate cache (HTML) files, one WebP version and one standard version. Note, after first enabling the cache it does take a few minutes to build up on your disk. To view if the caching is working you can simply look at the source code of your page. You will see “Cache Enabler by KeyCDN” along with the timestamp. Also, if it is delivering the WebP version this will show in a separate comment below it.

Advanced Features

A more advanced feature can be implemented to bypass PHP in the case that the PHP code is not optimized both on Apache and Nginx servers. You can read more about this on our Cache Enabler support page.

Clearing Cache

There are three ways you can clear your cache with Cache Enabler.

  1. In the settings page of the plugin if you hit “Save Changes” it will clear the cache.
  2. You can also click the “Clear Cache” up on your WordPress admin bar.
    wordpress clear cache
  3. In version 1.1.0 an individual “Clear URL Cache” was also added so that you can clear specific pages and or custom post archives.

Summary

Let us know what you think of Cache Enabler in the comments below. From caching to disk, to minification, a focus on HTTP/2 and serving up WebP images, you can see drastic speed improvements without any complex setup. Combined with our other plugins, CDN Enabler and Optimus, we hope to further speed up your content delivery in WordPress!

Related Articles

Free WordPress Cache Enabler Plugin was last modified: March 23rd, 2018 by Brian Jackson
Share This