Caching is a vital aspect of running a website. It’s a go-to for improving the performance of a site and should be one of the first things you implement when you launch.
Thanks to plugins, caching in WordPress doesn’t have to take hours to set up, or require any special skills, which is ideal.
In this guide, you’ll learn what WordPress caching is, how caching can help improve website load times and how to implement it on your WordPress website.
Let’s get started!
- What Is Caching?
- How Can WordPress Caching Plugins Help My Site?
- Before You Install a WordPress Caching Plugin
- What to Look For in a WordPress Caching Plugin
- WordPress Caching Methods Explained
- How WordPress Caching Plugins Can Break Your Site
- How to Set Up a WordPress Caching Plugin on a Dynamic Website
- Top 5 WordPress Caching Plugins
- Wrapping up
What Is Caching?
Caching is the storing of frequently used data so it can be accessed quickly.
It’s simpler than you might think.
Think of caching this way: You’re in your high-school math class and the teacher asks “What is 349,218.45 divided by 54.39?”
Everyone looks around at each other confused. Some kids bring out calculators and finally after a few minutes someone shouts out the correct answer.
Now the teacher asks the class the same question again and this time everyone says the answer in unison, how?
Because the hard work had already been done. Providing the answer isn’t slow, processing the answer is.
That’s caching in a nutshell. A request is made by a visitor, “Please load this web page.” The web server responds with “Sure! Let me figure that out”.
After a few seconds, the page is delivered to the visitor.
The web server keeps a copy of the page in case someone else wants a copy.
Now when another visitor makes a request, the middle part of processing the request is skipped as the server has already done it.
The process goes from:
- Make a request.
- Process the request.
- Respond to the request.
To:
- Make a request.
- Respond to the request.
This process of caching reduces the time it takes to deliver a web page to 2 seconds or less. Which also happens to be Google’s recommended load time.
How can you sum up caching? Caching is saving information for easy retrieval in case someone needs it again.
Thanks to cachingexplained.com for the inspiration behind this explanation.
How Can WordPress Caching Plugins Help My Site?
As caching plugins have the sole intention of making your website load faster, perhaps the question should be — what are the benefits of a faster loading website?
- Improved position in search results. One of Google’s ranking factors is speed, which impacts your SEO.
- Increased revenue for your business. After all, a 1-second delay in load time could result in a loss of $2.5 million a year!
- Happier users. Think of all those times you’ve tried to load a website and been frustrated because it was slow.
Before You Install a WordPress Caching Plugin
Before we dive into what to look for in a WordPress caching plugin and how to set up caching in WordPress, we need to address a key issue.
The assumption that installing a caching plugin is a silver bullet to all your WordPress performance issues (hint: it isn’t!).
What should you do before installing a WordPress caching plugin? Make sure you have decent hosting.
At the end of the day, you can have the most well-optimized caching setup, but if your hosting company has slow servers, there’s nothing you can do.
If you are looking for a new hosting company, we strongly recommend SiteGround.
Plans start from just $2.95/month for the first year and offer everything you need as a foundation for the performance of your WordPress website.
You also want to take into account the theme you use. The faster your theme, the faster page load times.
We built Astra with performance in mind. It weighs in at less than 50KB using default data and is blazing-fast!
If you aren’t convinced yet. Astra powers in excess of 1,600,000 websites and has over 5,600 5 star reviews!
What to Look For in a WordPress Caching Plugin
There’s a plethora of caching plugins available for WordPress. You only have to look at WordPres.org/plugins and type in “caching” to see there are over 900 results!
That’s without the premium offerings not available on the WordPress repository.
We’ve done the hard work for you though. We spent countless hours not only finding the best WordPress caching plugins, but also evaluating what makes a good WordPress caching plugin.
Here’s what makes a good caching plugin for WordPress:
Ease of Use
There’s no point using a plugin if it’s going to be difficult to use or has a confusing interface.
Ease of use is a primary consideration. We want every website owner, regardless of their skill level, to be able to make use of website caching!
One-Click-Configuration
Plugins such as WP Rocket offer one-click caching configuration and are set up out of the box. Other plugins offer similar features.
While this isn’t a must-have for everyone, if you are overwhelmed at the thought of installing a WordPress caching plugin, then one-click configuration could be for you.
Install the plugin, activate it and then use the default settings. You can then explore everything on your own time.
An Easy Way to Exclude Assets
If you’ve spent even a few minutes researching caching plugins, you’ll notice a common complaint is, “I’ve activated my WordPress caching plugin, and it’s breaking my site.”
This can happen when a caching plugin messes with scripts and other assets.
A good caching plugin lets you exclude scripts and styles from being cached. This allows you to use the power of caching without risking your site.
We’d go so far to say that if a caching plugin didn’t provide the option to exclude assets, we wouldn’t use it.
An Easy Way to Exclude Posts and Pages
The caching plugin you use should allow you to exclude posts and pages from being cached. Why?
You need to exclude the shopping cart, checkout, account pages, and any other dynamic pages you may have.
If those mentioned pages are cached, users may see each other’s information and checkout might not work.
Now you may be thinking “But I only have static posts, so it doesn’t matter to me”.
What if you decide to sell content online at a later date or create a membership website?
For these reasons, we only recommend caching plugins that provide the option to exclude posts and pages out of the box.
Minification of Assets
What exactly is minification? Minification, or “to minify,” as you’ll often see it referred to, is an option in most popular caching plugins.
The purpose of minification is to strip out white space, code comments and unnecessary data from files, making them smaller.
While minification doesn’t bring huge savings, every little helps.
Concatenation of Assets
Concat what? Don’t worry! Despite the strange name, it’s a more straightforward thing to follow than you might think.
Concatenation is the act of combining different files of one type into a single file.
For example, if you use 11 plugins and a theme, you’d have a minimum of 11 CSS files loading. That’s 11 requests the users’ browser has to make.
By concatenating files and combining them into one, you’ve just saved ten requests. In general, the fewer requests, the better!
Support
While caching in WordPress doesn’t have to be scary, there still is a lot to configure. That can be daunting.
Whatever WordPress caching plugin you pick, you want to ensure the developer provides excellent support.
While nothing may go wrong, it’s reassuring to know that support is there should you need it.
Pricing
Caching plugins are typically priced in one of three ways:
- Premium only – Caching plugins that have no free option.
- Freemium – Caching plugins that have a free option with a paid upgrade for more features and faster support.
- Free only – Caching plugins that only have a free version with no paid version and often limited support.
WooCommerce Support
There’s no getting away from it. WooCommerce is the premier eCommerce solution for WordPress.
Due to its ever-increasing popularity, some plugins such as WP Rocket have built-in integration with WooCommerce.
If the WordPress caching plugin you want to use doesn’t come with WooCommerce support out of the box, it’s often just a case of excluding the relevant pages.
However, life is much easier if WooCommerce caching integration is offered out of the box.
Membership Website Support
Some caching plugins make claims of being directly compatible with WordPress membership plugins.
I’m going to let you in on a secret… All WordPress caching plugins can be compatible with WordPress membership plugins.
How so? As long as the caching plugin gives you an option to exclude pages, it is compatible!
You just add the membership pages to the exclusions. That would typically include the login page and any other dynamic page.
WordPress Caching Methods Explained
There are two types of caching, server-side caching and client-side caching.
Server-side caching is where the content is cached on the web server like in the example we shared earlier.
Client-side caching is where the content is cached on the visitors’ computer, such as browser caching.
Then there are a few different caching methods you can use with WordPress.
They are:
- Browser caching
- Page caching
- Database caching
- Opcode caching
- CDN caching
In this section, we’re going to take a look at each of these.
Browser Caching
Browser caching is the most common method of caching. It caches the content and assets of your website in… you guessed it! The visitors’ browser.
But just how does WordPress browser caching help your site?
By caching your website in the browser, it keeps a copy of every page visited.
This allows the user to load the website faster on subsequent visits (until they clear their cache).
Browser caching is especially useful as it can significantly improve load times.
Page Caching
Page caching involves creating a static copy of your page and providing that to visitors.
That copy can be downloaded much faster and requires far fewer requests to generate. This can speed up delivery by a significant amount.
Utilizing page caching is one of the simplest methods of caching with no technical knowledge required.
Some WordPress caching plugins such as WP Rocket offer an option called “Cache Preload.”
Typically your page won’t be cached until someone visits it. Then it will be generated in the cache and stored for future visitors.
The Cache Preload option allows you to cache pages in advance, without waiting for individual visits to those pages.
That way, every visitor gets the superfast treatment!
Database Caching
Database caching stores common WordPress queries in order to speed up response times.
WordPress is a database-driven content management system so it depends on its database a lot.
Anything we can do to lower that dependency, can speed up page processing and reduce the load on the database.
Both can contribute to a faster, more satisfying user experience.
But, What Is Database Caching Anyway?
Database caching is the method of caching queries and the results of those queries for faster access the next time that the content set is requested.
Imagine you have a library of 1,000 books spread across 50 shelves. To find one book you have to go and look at every shelf and every book until you find it.
Essentially that’s what some database queries need to do.
Now imagine you kept a note of exactly where that book was located on your desk. The next time you go to look for it, you don’t even have to look as you know where it is.
That’s precisely what database caching is.
At the core of database caching, a query is run and then cached to prevent the same query from running every time that data is requested by a visitor.
Opcode Caching
WordPress is primarily built with a programming language called PHP.
Every time a visitor requests a page on your website, the PHP code has to be compiled to build the page or post.
Opcode caching enables the caching of the compiled code so that it doesn’t need to be compiled every time a page is requested.
For example, a sequence of PHP instructions is compiled to build a contact form. The user requests the form, PHP compiles the form and the user can interact with it.
Opcode caching keeps a copy of that compiled code so it doesn’t have to perform that task every time someone wants to use that form.
CDN Caching
A content delivery network (CDN) works by using servers around the world to store static files like pages, posts, images and media.
A CDN takes static copies of your site and distributes them across its network.
All traffic is then redirected to the CDN.
The CDN analyzes where the visitor comes from, chooses the server closest to them and serves the page from there.
As sending data over distance takes time, the shorter the distance, the shorter the time it takes to deliver content to a visitor.
How WordPress Caching Plugins Can Break Your Site
Understanding why your website broke after activating a caching plugin is vital to being able to speed up your WordPress website safely.
Top 3 Reasons WordPress Cache Plugins Break Your Site
1. You Updated Your Plugins and Themes and Haven’t Cleared Your Cache
An often overlooked aspect of caching and caching plugins is clearing the cache. It may sound obvious when you think about it, yet clearing the cache is one of the leading causes of issues.
Before you update your plugins and themes on your WordPress website, you should clear the cache of your site and your browser cache.
If a cached file changes with the update, there can be a mismatch between your cache and your live website. This is what can cause issues.
Once you’ve successfully updated your WordPress plugins and themes, you should then clear the cache of your site and your browser cache again.
Now when you visit your website, everything should work correctly!
2. You’ve Enabled Concatenation for All Your Files
Concatenation is a magical thing. It reduces the number of requests a browser needs to load and speeds up your website.
It’s just a button click-away in the most popular WordPress caching plugins.
However, it’s not all a bed of roses. Enabling concatenation can break your site.
Why? Anything that changes scripts on a website can cause issues. Whether that’s changing the load order or removing parts of the script required to run.
Whatever the cause, there is an easy way you can solve the issue of concatenation breaking websites.
You’ll need to use trial, error, and a sprinkling of patience.
Nearly all cache plugins allow you to exclude scripts from being cached or being included in the concatenation.
What you need to do is this:
- Disable the caching of a script or plugin.
- Clear your cache.
- View your site. Does it work? Great! If not, rinse and repeat until you find the problem script.
- Exclude that script from the cache.
- Re-enable caching for the files that aren’t affected.
As we said, it takes time and patience but it’s the best way to use caching without breaking website scripts.
3. You’ve Minified Your Scripts
Minification is often seen as a quick, and easy way to improve page load times. Yet it can also completely break your website.
Don’t worry though. Just like with concatenation there’s an easy way to fix it.
What you need to know is most well-coded plugins and themes often come with all assets already minified.
Trying to minify already minified files (try saying that quickly) is a recipe for disaster.
Here’s what you need to do if you notice any issues after minification:
- Disable the caching of a script or plugin.
- Clear your cache.
- View your site. Does it work? Great! If not, rinse and repeat until you find the problem script.
- Exclude that script from the cache.
- Re-enable caching for the files that aren’t affected.
As you may have noticed, this is exactly the same process as troubleshooting concatenation. It works though!
How to Set Up a WordPress Caching Plugin on a Dynamic Website
If you have paid attention so far, you’ll know that caching primarily uses copies of static assets to work.
But what if your pages are dynamic, like with a news website or social feed?
In this section, I’m going to show you how to set up caching for dynamic websites using WP Fastest Cache and WP Rocket.
What Is a Dynamic Website?
A dynamic website is any website that isn’t static. Think news websites, pages with social feeds, pages with scrolling tickers or content that changes frequently.
It may include any of the following functionality:
- Login/Logout – A cornerstone of a dynamic website is login and logout functionality. As you’ve probably guessed all WordPress websites are by their nature dynamic.
- eCommerce – Any website that sells digital or physical products using a plugin like WooCommerce is a dynamic website.
- API based websites – If you pull in data from a third-party resource there’s a good chance your website is dynamic and caching the data could result in outdated data being displayed to users.
How to Set Up WP Rocket for Your Dynamic Website
As WP Rocket is a popular WordPress caching plugin, we’ll use that to walk you through caching a dynamic website.
Step 1. Install and Activate WP Rocket
To install and activate WP Rocket, you’ll need to visit the website, sign up for an account and buy the plugin.
You can then download it to your computer and upload it to WordPress.
Once you’ve installed and activated the plugin you’ll see a couple of things.
- It’ll automatically preload the cache for you.
- Page caching is automatically enabled out of the box.
Step 2. Excluding Dynamic Pages
WP Rocket already does a lot of the hard work for us.
If you run an eCommerce website on WordPress using WooCommerce, BigCommerce, Easy Digital Downloads, iThemes Exchange, Jigoshop, or WP Shop, WP Rocket will automatically exclude the cart, checkout, and account pages.
Simple right?
If you run a membership site or have other types of content you need to exclude, head over to your WordPress dashboard.
Select Settings > WP Rocket > Advanced and add the URLs under the “Never Cache URLs” area.
As you can see, setting up dynamic content compatible caching with WP Rocket is a breeze!
How to Set Up WP Fastest Cache for Your Dynamic Website
WP Fastest Cache is another popular caching plugin, so let’s take a look at setting that up for dynamic pages.
Step 1. Install and Activate WP Fastest Cache
Set up and install WP Fastest Cache from within WordPress as you usually would.
It is available from within the WordPress repository so you can install and activate it from within the dashboard.
Unlike WP Rocket, WP Fastest Cache doesn’t pre-set anything so, this is going to take a bit more time.
The first thing you’ll notice is how many options there are within the user interface:
Step 2. Enable the Cache
Select WP Fastest Cache and check the box to enable the cache system.
Now the cache is enabled you need to exclude your dynamic content.
Step 3. Excluding Dynamic Content From WP Fastest Cache
If you’re running a WooCommerce site you don’t need to take any further action. WP Fastest Cache is compatible with WooCommerce out of the box.
However, if you are running a membership site you’ll need to exclude your account and payment pages.
This can be done in WP Fastest Cache > Exclude.
Then click “Add New Rule” which will open up the wizard to exclude a page, like this:
In the first dropdown, select “Is Equal To” and then in the second box, enter the exact URL you want to exclude from caching and click “Save.”
The WP Fastest Cache setup and interface definitely isn’t as slick as the one provided by WP Rocket.
However, you can still achieve the same result with excluding pages, and it’s free. Perfect for if you’re on a budget.
Top 5 WordPress Caching Plugins
As we’ve already explored, there are literally hundreds of caching plugins.
Here are our top 5, along with the positives and negatives of each.
1. WP Rocket
WP Rocket is a premium-only caching plugin for WordPress. As the plugin is premium only, there’s a strong focus on high-quality support. And the team behind it are more than happy to help with any queries or issues that may arise.
Pros of WP Rocket
- One-click configuration
- Automatic support for WooCommerce
- Cache preloading
- Lazy loading image feature
- Top-quality support
Cons of WP Rocket
- Premium only
- No free trial
WP Rocket is our favorite WordPress caching plugin because it makes everything easy.
All the default settings work but provide scope for customizing completely should you want to!
WP Rocket Pricing
WP Rocket offers a clear and transparent pricing structure, no tricks or additional add-ons.
Pricing for 1 website is $49, pricing for 3 websites is $99 and pricing for unlimited websites is $249.
WP Rocket Verdict
In our opinion, WP Rocket is, without a doubt, the best WordPress caching plugin available. Easy to set up, great support, and it offers everything you need from a caching plugin and nothing you don’t.
2. WP Super Cache
WP Super Cache is from the makers of WordPress.com (Automattic) who’s founder Matt, is a co-founder of WordPress.org open-source software.
WP Super Cache is extremely popular, with over 2+ million active installs.
Pros of WP Super Cache
- Free
- Maintained by the parent company of WordPress.com
- CDN support
- Cache preload support
- Developer friendly
Cons of WP Super Cache
- Lack of support
WP Super Cache Pricing
WP Super Cache is entirely free with no paid options.
WP Super Cache Verdict
WP Super Cache is a great caching plugin if you’re on a budget. However, be aware of the limited support provided and the fact that even if you want to, you can’t pay for help from the developers.
3. W3 Total Cache
W3 Total Cache has been one of the most popular caching plugins for WordPress for a while, with 1 million+ active installs.
However, there was some controversy over the past year with poor support from the plugin author and some paying users not receiving replies for months.
The plugin was recently bought by BoldGrid, a company that has recently acquired a string of WordPress plugins.
Pros of W3 Total Cache
- Everything you could need from a caching plugin
- Database caching support
- Compatible with a wide range of hosting types
- SSL support
- AMP support
Cons of W3 Total Cache
- Track record of poor customer support
W3 Total Cache Pricing
Overall the pricing structure for W3 Total Cache is straightforward, there’s one-tier which is $99/year for one site.
However, there’s no multi-site discount. For the cost of W3 Total Cache Pro for 3 sites, you could get an unlimited license for WP Rocket.
W3 Total Cache Verdict
W3 Total Cache is an excellent free plugin for WordPress caching. We do recommend investing in the premium plugin. We have already compared W3 Total Cache with WP Rocket, which will provide you all the required answers.
4. WP Fastest Cache
WP Fastest Cache is another WordPress caching plugin with over a million active installs.
While the plugin itself works well and provides some of the best results, it can be challenging to get to grips with for a beginner.
The plugin interface is old fashioned and not user-friendly, and many of the features you’d find for free in other caching plugins are locked to the pro version.
Despite this, it’s still one of our favorite caching plugins for WordPress.
Pros of WP Fastest Cache
- Well supported
- One-time payment for the Pro version (no yearly renewals)
- Core caching options available for free
- CDN support
- Preload cache
Cons of WP Fastest Cache
- Many features are locked to the Pro version
- Difficult to use for beginners
- Outdated interface
WP Fastest Cache Pricing
WP Fastest Cache has an unusual pricing structure for a WordPress plugin, as it’s a one time fee. That means you can pick the license for the number of sites you want and never pay another penny!
WP Fastest Cache Verdict
As long as you aren’t looking for an up-to-the-minute interface, WP Fastest Cache is a fantastic all-round caching solution for your WordPress website.
Fair transparent pricing combined with a wide range of functionality.
5. Hummingbird
Hummingbird by WPMU DEV, is the newest caching plugin here. While it’s new, it certainly isn’t lacking in features and has a modern, clean interface.
WPMU DEV themselves are no strangers to the WordPress plugin market. In fact, they are one of the most popular premium WordPress plugin companies.
They offer a suite of plugins related to caching, security, backups, and the maintenance of your website.
Pros of Hummingbird
- Clean modern interface
- Easy to use
- Everything you need is available in the free version
- Fast support
- Lazy load images with free Smush integration
Cons of Hummingbird
- Expensive pricing model if you only want to use caching
Hummingbird Pricing
WPMU DEV only sells Hummingbird Pro as a bundle with all their other plugins and services including, security, backups, and hosting. For $49/month for unlimited sites and $30/month of site hosting credit is included.
Hummingbird Verdict
Even though Hummingbird is one of the newer players in the market, WPMU DEV has released a feature-rich plugin that includes a vast array of features.
With free support provided you most probably won’t even need to upgrade to Hummingbird Pro.
Wrapping up
Phew! That was a lot of content. We hope you enjoyed the article!
Caching doesn’t have to be difficult or complex and knowing what to look for and how to resolve issues before you dive in, is a sure-fire way to success.
Do you already use a WordPress caching plugin?
Have you encountered some of the issues mentioned here when using a WordPress caching plugin? Let us know in the comments below.
Abhijeet Kaldate is the co-founder and CRO of Brainstorm Force. With a keen eye for detail and a knack for getting things done, Abhijeet oversees the company's operations, managing key areas such as HR, marketing, design and finance.
Disclosure: This blog may contain affiliate links. If you make a purchase through one of these links, we may receive a small commission. Read disclosure. Rest assured that we only recommend products that we have personally used and believe will add value to our readers. Thanks for your support!
You mention siteground as a host. What do you think of the SG Optimizer as a caching plugin? Could you add this to your review?