Hyper Cache is a cache plugin written purely in PHP to provide with high compatibility with most WordPress setups and configurations. It can be used with low-resource hosting and well as on high-end servers alike.
This tutorial assumes you've already gone through the steps to create a StackPath Site.
This article will walk you through how to perform a static assets integration, which does not support the use of the StackPath Web Application Firewall (WAF). If you’re looking to maximize security by using our CDN with the WAF, please refer to the CDN & WAF integration guide.
Before you begin, we highly recommend you test the performance of your site using Google Page Speed or Pingdom Tools. You can test your site now and after setting up the plugin for a before and after performance comparison.
This walkthrough will show how to integrate and make the best use of the Hyper Cache plugin:
- Log into the WordPress admin panel.
- Hover your mouse over Plugins and click Add New.
- In the Search box, type Hyper Cache and click Search Plugins.
- Click Install Now. A prompt dialog will open and ask if you are sure you want to install the plugin. Click OK; then, after the plugin is installed, click Activate Plugin.
- Navigate to Settings → Hyper Cache.
- Navigate to the General page of Hyper Cache.
- In the Cached pages will be valid for section, you can set the amount of time you want your page to be cached. It’s set to 24 hours by default; setting it to 0 will cache it forever.
- Check Enable compression.
- Check Enable on-the-fly compression.
- Check Allow browser caching. It’s set to 24 hours by default.
- Navigate to the Mobile page.
- Under Working mode, choose cache separately if you produce different content for mobile devices. If not, select use standard cache.
- Navigate to the CDN page.
- Click Enable.
- Enter your StackPath Edge Address in the CDN URL field.
- Click on Save.
- Click on the Clean the whole cache button.
NOTE: After enabling the StackPath CDN, you might encounter the following error:
You must add to the file wp-config.php (after the define("WPLANG", "");) the line of code: define("WP_CACHE", true);
After seeing this, edit your wp-config.php file and add this in a separate line:
define("WP_CACHE", true);
Compare the before and after tests and note that it can take one to seven days for your site to reflect the performance improvements of a CDN. Both of these test sites also will give you SEO recommendations that you can follow.