Users and search engines have one thing in common, they love sites that load very fast. This is why optimizing the speed of your WordPress site should be your primary concern. Luckily, there are optimization steps you can apply to speed up your WP website. For instance, using a caching plugin such as WP Super Cache or W3 Total Cache can improve your sites’ load time if you configure it well.
WordPress is one of the most popular CMS for managing content on the internet. And though it works fast on its own, it’s quite common to see sites with the poor loading speed, especially those that use many WordPress plugins.
In this guide, we will discuss some of the benefits of using a caching plugin on a WordPress site and then show you how to install and configure WP Super Cache Plugin.
- Benefits of using a Caching Plugin in WordPress
- Getting Started with WP Super Cache Plugin
- How to Configure WP Super Cache Plugin
Benefits of Using a Caching Plugin in WordPress
The function of caching plugins is mainly to store your page files on the hosting server so that it can render the saved version to users much faster.
Each time a user wants to access a page on your site, WordPress will have to query the database. Then it generates the page from the DB content, and template, script, and styling files. All of this consumes resources and takes time.
With a cache plugin installed, this process takes place for the first user request. Thereafter, the generated page is saved on your cache and served very quickly to the next person who requests for it.
Thus, caching in WordPress increases the website loading speed because fewer calls will be made to the database. This speed improvement can largely impact your sites’ performance on search engines and potentially increase your traffic.
Since 2010, site speed has been an important ranking factor in Google. This means, if your site loading speed is low, it may lead to search engines deindexing your site.
For more on WordPress speed optimization (beyond caching), check this guide on how to speed up your WordPress site.
Getting Started With WP Super Cache
WP Super Cache plugin creates static files from your WordPress database and stores them temporarily on the server. These cache files are served to your users instead of querying the database.
By default, the files are stored in the ‘wp-content/cache’ folder on your WordPress hosting server.
This caching plugin will display static html files for users who are not logged in to your site, users who have not commented on your site, and users who have not accessed any password-protected page.
To start, you will need to install and activate WP Super Cache plugin on your WordPress dashboard.
For this, go to Plugins > Add New and then type ‘wp super cache’ in the search box.
Next, click on the ‘Install Now’ button, and when the installation completes, click Activate.
You will receive a notification that the plugin is disabled and a link to the plugin settings page where you can Turn on Caching.
Alternatively, you may access the plugin’s settings dashboard by going to Settings > WP Super Cache.
How to Configure WP Super Cache
On the settings page, select the ‘Caching On’ option as seen in the image below to enable caching on your WordPress site.
After that, click on the ‘Update Status’ button.
This option will turn on simple caching on your website. It will disable caching for logged-in users and will also enable cache rebuilding.
Cache rebuilding simply means the plugin will clear old cache files after an interval and generate a new cache on your server.
You can work with the basic configurations in the Easy Mode because it works just fine for most sites. However, if you want to have more flexibility on how the caching plugin works on your site, you may use Advanced Settings to configure additional parameters.
For this, click on the Advanced tab to open the Advanced Mode settings page.
Advanced Mode Settings
In the advanced settings, there are two cache delivery methods you can choose from (Simple or Expert mode).
The Simple version uses PHP to store static files on your server. The Expert version uses the Apache Mod Rewrite rule on your server which is faster than the simple version.
However, the expert level requires updating mod rewrite rules in the .htaccess file for it to work effectively. You can use the Simple Cache delivery method if you are not comfortable editing server files.
After selecting the cache delivery method, scroll down to the Miscellaneous settings and configure as follows.
Under Cache Restrictions, we recommend you select the option to disable caching for logged-in users. This is because users who log in to your site often require access to dynamic data.
Next, tick the option that disables caching on pages with GET parameters such as search result pages.
We recommend leaving the Cache rebuild option turned on. This will ensure users also receive supercache version of your site while the plugin is generating a new cache file on the server.
Lastly, tick the box to enable 304 Browser caching. This option enables the WP Super Cache plugin to store static files on the users’ browser.
Next, you should tick the box to clear all cache files when you publish or update a post on your blog.
Lastly, tick the option to occasionally check the homepage and prevent caching. This is useful because many blogs display their posts on the homepage which updates regularly for most news sites.
Below the Advanced settings, you will find the ‘Cache Location’ settings, with which you can specify where you want the static files to be stored on your server. The default location works just fine for most sites.
After configuring the settings in the ‘Advanced’ tab, click on ‘Update Status’ to save your changes.
Expiry Time and Garbage Collection
On the advance mode tab of the WP Super cache plugin, scroll down and locate the ‘Expiry time and garbage collection’ settings. Here, you can set the cache timeout. This is the duration for which a cache file is valid after which it will be rebuilt by the plugin.
The default timeout is 1800 seconds (30 minutes) and it works well for most sites. However, we recommend using 1 hour (3600 seconds) if you do not update your site so often.
Next, we will set the interval for garbage collection. Garbage collection is simply the process of deleting old cache files on the server. After the plugin rebuilds your cache files, the stale files are not immediately deleted from the server.
The garbage collector takes care of permanently clearing your cache files at the specified interval. It sets a WordPress cron job that will be triggered at the interval you specify.
Here, we used the clock scheduler to set the plugin to check for stale files hourly as seen in the image above.
After setting the expiry time and interval for garbage collection, scroll down and click on the ‘Change Expiration’ button to save your changes.
Accepted Filenames and Rejected URIs Settings
Below Expiry Time, you will find the accepted filenames settings. Here, you can set the pages you want to disable caching on.
Pages that are highly dynamic such as Search pages should not be cached because the page content depends on what your user is searching.
Click on ‘Save Settings’ after selecting the rejected URIs on your site.
Enabling CDN is an optional configuration for the plugin that will improve the loading speed of your WordPress blog.
They store your files on multiple data centers across the world, which helps to reduce the distance between your server files and your users. This in turn will relieve your server of the task of rendering static files from the database.
WP Super Cache has support for CDN configuration. You can either use an external CDN service or the Site Accelerator feature on the Jetpack plugin.
To start, click on the CDN tab on the WP Super Cache settings page.
If you are already using Jetpack on your site, you can click on the link to go to the Jetpack settings page as seen in the image above.
Here, click on the Performance tab and then enable the site accelerator feature.
After that, your static files will automatically be handled by Jetpack’s servers.
Alternatively, you can use an external CDN service and then connect your site files to an offsite URL such as https://cdn.yoursite.com.
For this, you will need to configure your WordPress site to use a CDN service (if you are not using it already). Here’s our list of the best CDNs to use in WordPress.
After configuring your site with a CDN service, tick the box to ‘Enable CDN Support’ and then enter your off-site CDN URL in the box as seen below.
You can leave other settings as is. Then, scroll down and tick the option that reads “Skip HTTPS to avoid ‘mixed content’ errors”. This will ensure your site is always secure with a padlock icon.
Lastly, click on the Save Changes button.
Testing Your Site
At this point, you are through with the basic settings you need to configure to get the plugin up and running. You can now use a tool such as GTmetrix to test the speed of your site after configuring the plugin.
If you want to see information about the cache files generated, click on the ‘Contents’ tab from the plugins’ settings page.
Also, you can manually delete the cache files by clicking on the Delete Cache button.
Conclusion – WP Super Cache
WP Super Cache is one out of many WordPress caching plugins that help improve your sites’ loading speed. In this guide, you have learned the benefits that come with using a caching plugin and also how to configure the plugin on a WordPress site.
However, speeding up your WordPress site can get challenging especially if you are using many plugins on your site.
If using the caching plugin we explained above does not give you the speed improvement you need, then you can read our complete speed optimization guide.
Also, you can reach out to us so our experts help you speed up your WordPress site.