If you want an easy and quick way to optimize the speed of your WordPress website, data caching is one of the first places to look. First, let’s define what caching is and why it’s important. Then, we'll explore some plugins that can simplify and even automate the process for you.
What is caching?
Caching is the process of saving and storing static copies of your site’s files in a temporary storage location. Doing this allows a web page to be delivered to the visitor’s browser more quickly.
To fully understand the benefits of caching, let’s review what happens when a visitor sees your website for the first time.
If your website uses caching, some information from your site's web pages will be stored locally on the user's device. The next time a user visits a page on your website, some of that information is fetched from their computer's local storage instead of your web server. As you can guess, getting data from a cache is faster than retrieving it from a distant web server.
Additionally, by caching your website, your server uses fewer resources to load a web page, which in turn reduces Time to First Byte (TTFB). TTFB is the amount of time between the browser sending a request to the server and receiving its first byte of data. This will improve your overall website performance.
How do you set up caching in WordPress?
While many websites use caching to improve performance, the WordPress CMS doesn't include caching functionality in its core feature set.
Your hosting provider may enable caching for your site (in which case you may not be allowed to install some or any caching plugins). If not, you can turn on caching yourself.
While you can set up caching manually on your WordPress site, it will require you to add code to your cache.php file or create an SQL query. If you don’t have the technical experience to feel comfortable with either method, the easier alternative is to use a WordPress plugin.
Let’s check out some of the best cache plugins available below.
Best WordPress Cache Plugins
The best cache plugins for WordPress will enable you to quickly and easily cache your posts and pages. Below is a collection of premium and free performance plugins for WordPress that do just that.
1. WP Rocket
WP Rocket is the easiest and most powerful premium caching plugin to speed up your website. It’s the #1 performance plugin recommended by WordPress experts — the perfect choice for both non-experts and tech savvies.
It’s also optimized for ecommerce sites, so it automatically excludes “Cart,” “Checkout,” and “My Account” pages from the cache to avoid interfering with the purchasing process.
What sets WP Rocket apart from other speed optimization plugins is that it improves your website loading time right upon activation, thanks to the features enabled by default.
WP Fastest Cache is the highest-rated cache plugin in the official WordPress directory. The free version of WP Fastest Cache offers a range of advanced features. With this plugin, site admins can delete all cached files and minified CSS and JS files, or schedule them to be deleted at a particular time. They can also enable or disable the cache option for mobile devices and logged-in users — all by checking a box in the settings page.
Unlike other free cache plugins like W3 Total Cache, WP Fastest Cache not only minifies HTML and CSS files — it combines them to make your code cleaner and web pages leaner.
SiteGround Optimizer is a free, top-rated and award-winning plugin with more than 1 million active installations. The plugin comes with premium features designed to speed up your website and is developed by WordPress experts with over 18 years of experience in hosting and speeding up WordPress sites.
For caching, you'll find dynamic caching, file-based caching, and Memcached that can significantly speed up your site. The plugin includes environment optimizations like GZIP compression, WordPress Heartbeat optimization, and browser caching to ensure that your site is tidied up and performing with faster loading speeds. Frontend optimizations help to decrease the size and improve loading speed of frontend resources. The super efficient image compression will reduce your image size by 85% without loss in quality.
The SiteGround Optimizer plugin is completely free and available for all WordPress users. It's easy to use and has smart tips that help non-technical users to determine which optimizations are right for their site.
What sets LiteSpeed Cache apart from other plugins is that it’s server-level cache, which is faster than a PHP-level cache. So while the plugin is free, it does require you to use the LiteSpeed Web Server for its built-in page cache features.
You can also check a box to generate separate files for mobile devices to ensure an optimized version of your website is served to users on mobile devices.
Unlike the previous plugins, WP-Optimize is an all-in-one solution for web optimization. In addition to caching your web pages, it will help you clean your database and compress your images, which will make your site even faster.
W3 Total Cache (W3TC) W3TC is one of the most popular cache plugins for WordPress. One reason for its popularity is that it’s compatible with most hosting plans, including shared, VPS, and dedicated server hosting.
You can also set up an integration with your CDN provider for even better website performance. And, you can test all these configurations in preview mode before deploying them on your website.
W3 Total Cache Pro offers even more functionality, including fragment caching, advanced caching statistics, lazy load for Google Maps, and more.
WP Super Cache is a free cache plugin developed by Automattic. With over two million active installations, it’s the most downloaded cache plugin from the WordPress directory.
Part of this plugin's appeal is its three caching modes. "Expert" mode is the fastest, but requires you to modify the .htaccess file. While it’s great for developers and users with technical experience who want more control over the caching process, it’s not ideal for all users — particularly since making a mistake in the .htaccess file can take down the whole website.
That’s why WP Super Cache also offers "Simple" mode. In this mode, the plugin generates static HTML files to serve to most visitors. There is one other mode called WP-Cache for serving custom cached files that are tailored to visitors who are logged in, viewing a password-protected page, or have left comments.
There is a premium version available with even more advanced features, including automated scanning, uptime monitoring, enhanced minify compression, and CDN-hosted minification.
Cache Enabler is a simple, lightweight performance plugin for WordPress. It allows users to set cached files to expire after a period of time, clear the site cache if content has changed, pre-compress cached pages with GZIP, and minify the HTML in cached pages. It also works on multisite networks.
It is limited in functionality compared to other plugins on this list, however. For example, a user can only clear the site cache if a post type, comment, or plugin has been published/activated, updated, or deleted. Excluding content from the cache is even trickier. Instead of checking a box, the user has to type in the post ID, page path, query string, or cookies manually to control what pages should bypass the cache.
10. Comet Cache
Comet Cache is an easy-to-use plugin for caching your WordPress posts, pages, tags, categories, archives, RSS feeds, and XML sitemaps. The settings page contains detailed explanations of its features, making Comet Cache a beginner-friendly option for users who aren't familiar with caching.
You will have to purchase Comet Cache Pro for some of the features that the above mentioned plugins offer for free, like HTML compression and the ability to cache logged-in users.
Also, unlike other cache plugins, Comet Cache does not directly handle GZIP compression. If your site is running on the Apache web server, you can enable GZIP compression in your admin dashboard in a few clicks. If it’s not, then you’ll have to create an .htaccess file in your WordPress installation directory or edit the one that’s already there. If GZIP compression is a must-have feature, then this plugin might not be the right choice for you.
11. Borlabs Cache
Its fragment caching feature, for example, enables you to have some dynamic content in your static files so that you can still serve ads in cached versions of your site.
It also offers cache presets so that you can have different cache settings for every site in your WordPress multisite installation. Most cache plugins that support multisite networks only allow you to set global cache settings.
Speed up your site.
A cache plugin is a must-have WordPress plugin to boost site performance and increase user satisfaction. You can use any of the plugins above to create a fast website that delights your visitors — without touching any code in your theme or .htaccess files.
Editor's note: This post was originally published in January 2021 and has been updated for comprehensiveness.