WordPress Caching Plugins
What a WordPress Caching Plugin Does
A WordPress caching plugin is an add-on that stores finished copies of your pages, so WordPress does not have to build them again for every visitor. Without a cache, WordPress runs PHP code and database queries each time a page is requested. A caching plugin intercepts that work and serves a stored copy instead.
Most caching plugins handle a few related jobs:
- Page cache files. The plugin saves the generated HTML of a page to disk and serves that file to later visitors.
- Preloading. Some plugins crawl your site after the cache is cleared, so the copies exist before visitors arrive.
- Browser cache rules. The plugin sets headers that tell browsers how long they may keep images, CSS and JavaScript files.
- File optimisation. Many plugins also minify files, meaning they remove spaces and comments to make them smaller. This belongs to site performance, and it should be tested because some combinations break scripts.
Why a Page Plugin Overlaps With Server Caching
Caching can happen at several layers at once. A web server may cache responses before WordPress is involved. A host might run a reverse proxy in front of the site or an object cache for database results. When these layers already exist, a page caching plugin adds little and can cause confusion. If the plugin keeps one copy while the server keeps another, an update may appear in one place and not the other.
It helps to know which layer is doing the work. A server running LiteSpeed Web Server, for example, has its own cache layer, and a matching WordPress plugin can coordinate with it. The LiteSpeed Cache article explains that approach. For the general mechanics of storing whole pages, see page caching.
Example: A Blog Update That Does Not Show
A small business blog is cached by a plugin. The owner edits a service page and refreshes the site, but the old text still appears. The plugin has kept its copy, which will stay until it is cleared or expires. Meanwhile, a logged-in editor sees the new text because the plugin skips the cache for signed-in users.
After the cache is cleared, the first visitor to each page triggers a fresh build. On a busy blog, that first wave of requests can be slow. Warming the cache after a big change, as described in cache warming, avoids that slow start.
Frequently asked questions
Do I need a WordPress caching plugin if my host already caches?
Not always. If your host already runs server-level caching that covers full pages, a second page plugin may add nothing and can create duplicate copies. Check with your host what it caches before installing one. If the host does not cache pages, a plugin is usually the simplest way to add page caching.
Why do my edits sometimes not appear right away?
A cached copy of the page is still being served. The plugin, the server or a CDN may each hold a copy, and each follows its own expiry rule. Clearing the cache in the plugin usually fixes the problem, although a CDN or browser may need a separate step. Logged-in editors often see changes sooner because the cache is skipped for them.