Page cache
A page cache keeps the finished HTML of a page and hands that copy to the next visitor, so WordPress does not build the page again. It is the biggest single speed gain on most sites, and it must leave out every page built for one person.
- By
- WP Ministry
- Published
In short
- A page cache stores finished pages for visitors. It does nothing for the dashboard, logged-in users, or a store's cart and checkout.
- Run one page cache. Find out whether your host already has one before you add a plugin.
- When a change does not show, or a visitor sees a page meant for someone else, look at the page cache first.
WordPress builds a page each time one is asked for. PHP runs, the database is read, and the result is sent as HTML. A page cache keeps that HTML and sends the stored copy to the next visitor. WordPress's own guide says caching plugins store posts and pages as static files, which reduces the processing load on the server.
The copy can be kept in three places: by a plugin on your server, by a cache your host runs in front of WordPress, or by a CDN that stores whole pages.
A site has several caches, and each stores something different. A page cache stores whole pages. An object cache stores pieces of data WordPress read from the database, and a transient is one such piece with an expiry time. OPcache stores compiled PHP code. A CDN keeps copies of files on servers near the visitor.
Where you meet it
- Site Health. Go to Tools, then Site Health. On a live site, WordPress looks for a page cache plugin, makes three requests to the home page and reads the response headers. The result is one of four lines: "Page cache is detected and the server response time is good", "Page cache is not detected but the server response time is OK", "Page cache is not detected and the server response time is slow" or "Page cache is detected but the server response time is still slow".
wp-config.php. The linedefine( 'WP_CACHE', true );tells WordPress to load the filewp-content/advanced-cache.phpearly. WordPress's documentation says the line "does not enable caching by itself": it does nothing unless that file exists.- The Drop-ins list. Under Tools, then Site Health, then Info, the "Drop-ins" section lists
advanced-cache.phpas "Advanced caching plugin."
What goes wrong
- A change does not show. Visitors are still being given the stored copy. Clear the plugin's cache, then the host's, then the CDN's. WordPress caching plugins compared explains why a change can leave other pages stale.
- A personal page is cached. WordPress's hosting handbook says a store's cart, checkout and profile pages must stay completely dynamic, and WooCommerce names Cart, My Account and Checkout. When one is cached, a customer can be shown another customer's page, or the order fails. See how to fix a WooCommerce checkout that is not working and how to speed up WooCommerce.
- Two page caches at once. A host's cache and a plugin's each keep their own copy and clear it on their own schedule. Use one.
- Visitors get fast pages and you do not. The handbook advises leaving logged-in users out of the cache, so the dashboard is built from scratch every time. See how to find the cause of a slow WordPress admin.
- Site Health reports a cache and a slow server. The home page still took too long to answer in WordPress's own test. How to reduce server response time shows how to time a page with and without the cache.
How to speed up a slow WordPress site shows where a page cache comes in the order of work.
Common questions
Does a page cache speed up the WordPress dashboard?
No. A page cache serves stored pages to visitors who are not logged in. Dashboard screens are built by PHP and the database every time. A persistent object cache and OPcache are the caches that help there.
Do I need a caching plugin if my host caches pages?
Usually not. If the host runs a page cache, use that one and leave a plugin's page caching off.
Is a page cache the same as the browser cache?
No. The browser cache is on the visitor's own device and holds files that visitor has already downloaded. A page cache is on the server's side and gives the same stored page to every visitor.

