How Does WordPress Caching Work?
The goal of every WordPress performance plugin is to reduce the time it takes to deliver a page to visitors. One of the main ways to achieve this is by storing a copy of each page. This is known as “Page Caching“.
On a typical unoptimized WordPress website, average page loading times can be around 3 to 5 seconds. By delivering static pages and following recommended optimization practices, page loading times can be reduced to between 0.5 seconds and 1 second.
Each time someone visits a page on a WordPress website that does not use page caching, the server needs to:
- Load all WordPress core files
- Retrieve content stored in multiple tables from the website’s MySQL database
- Deliver this content to the visitor
This process can be quite intensive so it can take a while for the page to be delivered to the user. The process also has to be repeated every single time someone loads the page. Rather than go through this process every single time, a WordPress caching plugin will process a page once and generate an identical copy of it.
A cached page will be created for each page on your website and when someone visits your website, they will be delivered the faster “Cached” version of each page. Most WordPress caching plugins also support Content Delivery Networks (CDNs) to allow you to store your cached pages in data centres around the world. This reduces server response time further for visitors and helps your website handle traffic spikes better.
Clear Website Cache After Every Update
Cached HTML pages will become out of date if they are not regenerated after website updates. In order to update the cached version of a page, you need to delete the existing cached file.
The button to delete the existing cached version of a page is usually entitled “Delete Cache” or “Clear Cache“. The cache can be cleared on a page by page basis, but the option to “Clear All Cache” is preferred in most situations.
WordPress caching plugins will generate a new static copy of a page if none exists already. By default, this is processed the next time a visitor requests a page, though page cache can be preloaded if you wish.
Whenever you update a blog post or page on your website, your website’s caching plugin will update the corresponding static HTML page so that it remains up to date. Unfortunately, cached pages are not updated when you perform other updates.
It is therefore important to manually clear all cache after making a major change to your website such as changing your website design or activating or deactivating a WordPress plugin. If you get into the habit of doing this, your cached pages will always be up to date.
Page Caching is One Piece of the Website Optimisation Puzzle
Page caching is one of the most effective techniques to reduce page loading times, but it does not guarantee a fast website. Your pages will still load slowly if you do not follow recommended optimization practices such as image optimisation.
Ultimately, the goal is to create a fast website. WordPress caching plugins should be at the center of every good website optimization setup, but be sure to use other performance plugins to improve page speed further.
Website Caching Issues That May Arise
WordPress optimisation techniques will help make your website faster, though be aware that some minor problems and configuration issues can arise when you use a WordPress caching plugin.
If you encounter any major problem, the first step is to undo the last setting you changed. Major issues can be resolved by resetting the caching plugin to default settings or deactivating the plugin altogether.
|Page caching can cause your website design or content to be out of date.||Clear page cache|
The Pros & Cons of Web Hosting Page Caching
Some website hosting companies offer website caching at a server level, which means that no WordPress caching plugin is necessary. This is a great option for many website owners as it simplifies the process of delivering fast-loading pages.
Be aware that if a hosting company offers website caching, they may not allow WordPress caching plugins to be installed on your website as it may cause conflicts.
|Tuned to Perfection||The web host can configure page caching so that it works in harmony with their server|
|Simplicity||No WordPress caching plugin has to be configured when the hosting company handles everything for you|
Should you use a WordPress caching plugin if your web host offers page caching? That depends.
For beginners, letting your hosting company handle page caching is a simple and effective way of improving page speed. For technical users, however, passing full control of page caching to your hosting company could be problematic as you are not able to customise settings exactly how you need.
|Limited Customisation||Few caching tweaks and customisation options may be available|
|Troubleshooting||It can be difficult to troubleshoot problems and optimise performance exactly how you want|
I encourage you to speak to your hosting company about your website setup. This will help you make an informed decision about which caching method to use.
Page Caching With WooCommerce
Page caching is primarily designed for static content that doesn’t change, so it is important not to cache dynamic content.
On a WooCommerce online store, dynamic pages such as the shopping cart, checkout and account area, should not be cached. Widgets that show shopping cart and order information should be excluded too. This will ensure that customers do not experience any issues with orders.
To read more about configuring caching plugins with WooCommerce, please read the official WooCommerce documentation page “Configuring Caching Plugins“.
I hope you now have a better understanding of how page caching works and how effective it can be in reducing page loading times on a WordPress website.
Please check out my guide on “The Best WordPress Caching Plugins For Improving Website Speed” for a comprehensive look at the best WordPress caching solutions available today.