How to Install and Setup WP Super Cache for Beginners

207

Search engines consider site speed to be an important factor search rankings. This is why at WPBeginner we try our best to improve site load speed to an optimal level. Doing that, we have noticed that caching our website helped us improve site speed as well as balancing huge spikes in traffic. We use W3 Total Cache to improve performance of our website. However, many of our readers asked us about how to install and setup WP Super Cache. Therefore in this guide, we will show you how to install and properly setup WP Super Cache.

Note: Both W3 Total Cache and WP Super Cache are great plugins. We highly recommend that you use one or the other depending on your needs.

First thing you need to do is install and activate WP Super Cache plugin (tutorial: how to install a WordPress plugin). Upon activation, WP Super Cache will notify you that caching is not enabled on your website at the moment.

Setting up WP Super Cache – The Easy Way

To enable cache, go to Settings » WP Super Cache. Under the Easy tab, turn Caching on and hit update status button.

Turning on Cache in WP Super Cache for WordPress

After turning on the cache, click on the test cache button to check if it is working. WP Super Cache will fetch your WordPress site twice and will compare the time stamps of both pages. If the both time stamps match then this means that caching is working on your site now.

WP Super Cache Advanced Set up

WP super cache is a powerful plugin, and it comes with many advance options. These options can further improve your site’s performance. To Set up WP Super Cache with advance options, go to Settings » WP Super Cache and click on Advanced tab.

Advance set up for WP Super Cache

Enable Caching
First check the box that says Cache hits to this website for quick access. Below that you will see three caching options. By default WP Super Cache uses PHP to serve cache files. However, using PHP to serve cache files can be resource intensive particularly on shared hosting environments. So we would like to recommend that you try using mod_rewrite to serve cache files. After that scroll down and hit the update status button to save these settings.

WP Super Cache will now show you a notification that mod_rewrite rules must be updated and possibly another notification about scheduling garbage collection. Scroll down the page, and you will see mod_rewrite rules that needs to be added. Click on Update Mod_Rewrite Rules button to update these rules. Once mod_rewrite rules are updated this section will turn green.

To resolve the notice about garbage collection, scroll down on the advance settings page to the Expiry Time & Garbage Collection section and set up a time and frequency for garbage collection of cached files on your server.

Scheduling garbage collection and setting cache expiration

Enable Compression in WP Super Cache: Compression allows WP Super Cache to serve cached files as compressed files. These files are downloaded by user browsers quickly due to their smaller size. To enable compression, simply check the box that says Compress pages so they’re served more quickly to visitors.

Setting up CDN with WP Super Cache

Most content websites serve a lot of static files with each page request. These files are JavaScripts, images, stylesheets, etc. Unlike your WordPress posts which are dynamically generated by PHP, these files can be served using a Content Delivery Network (CDN). If you don’t know what is a CDN or why you need a CDN, then you should check out our infographic “What the Heck is a CDN“.

At WPBeginner we use MaxCDN. You can read our blueprint on Why we use MaxCDN. If you need help setting up MaxCDN, then we already have a tutorial for how to install and setup MaxCDN for WordPress. The tutorial uses W3 Total cache, but the basic concept is the same.

To setup CDN with WP Super Cache, click on the CDN tab and check the box next to Enable CDN Support option. Enter your offsite URL, which will be the url of your pullzone. For example, http://cdn.wpbeginner.com

Setting up MaxCDN with WP Super Cache

In the additional CNAMEs field enter other CNAMEs you have created for your pullzone. For example, http://cdn1.wpbeginner.com, http://cdn2.wpbeginner.com , http://cdn3.wpbeginner.com

Lastly, check the box that says Skip https URLs to avoid “mixed content” errors and save changes. Now your website is now ready to serve static content from a CDN.

Serve a Static Site with WP Super Cache

The preload mode in WP Super Cache allows you to create super cache static files for all your posts and pages and serve a static website. You may ask Why would anyone want to do that?

To conserve server resources.
To serve an old site that is not being updated anymore.
To improve site speed by serving static content only.

These were just a few reasons but there could be many more reasons and situations where you might want to completely disable PHP processes. Don’t worry your WordPress will work normally, and you will still be able to manage your content with WordPress.

Preload WP Super Cache and Serve Static Files

Refresh preload cache files options will be set to zero by default, minimum required time is at least 30 minutes. Pre-loading your entire WordPress site takes some time and consumes a lot of resources on your server. You can leave it to 0 if you do not want your static files to expire ever unless you manually refresh cache.

We hope this guide helped you setup WP Super Cache on your WordPress blog. For plugin specific support, please post all your questions in the WordPress support forums for the plugin author. Read our guide on how to properly ask for WordPress support and get it.

For other feedback and questions, please leave a comment below.