Page caching saves the finished HTML of a page the first time it is requested. Later visitors get that saved copy instead of waiting for WordPress, PHP and the database to build the page again. It is the biggest single speed improvement Powered Cache makes, and the other features build on it.
Available in: Powered Cache (free)
Where to find it: Powered Cache → Cache
How page caching works #
When page caching is on, Powered Cache installs the advanced-cache.php drop-in and sets WP_CACHE to true in wp-config.php. The drop-in runs before WordPress on every request:
- First visit (cache miss): WordPress builds the page as usual, and Powered Cache saves the HTML in
wp-content/cache/powered-cache/. - Next visits (cache hit): the saved file is returned right away, without loading WordPress.
- Content changes or the cache expires: the saved copy is removed, and the next visit creates a fresh one. Turn on Cache Preload to have Powered Cache rebuild it before a visitor asks for it.
On Apache and LiteSpeed, the web server can also serve cached files directly, without starting PHP at all. See Server configuration.
Enable page caching #
- Go to Powered Cache → Cache.
- Turn on Page Cache (Serve cached pages).
- Click Save Settings.
- Open your site in a private browser window and check that the page is cached.
Page caching is on by default for new installations. If Powered Cache cannot update wp-config.php or the drop-in file, it shows a notice with a Fix configuration button. See Settings check and Fix configuration.
Settings #
Page Cache #
Turns full-page caching on or off. When it is off, WordPress builds every request, and responses carry X-Powered-Cache: MISS.
Mobile Cache #
Caches visits from phones and tablets. Default: on. When it is off, mobile visitors skip the cache completely and always get a freshly built page.
Separate Mobile Cache #
Keeps a separate cached copy of each page for mobile visitors. Default: off. You need it only when your theme or a plugin sends different HTML to mobile devices, for example by using wp_is_mobile(). Responsive themes that adapt with CSS send the same HTML to every device and do not need it.
Logged-in User Cache #
Caches pages for logged-in users too. Default: off. Every logged-in user gets their own cached copy, so nobody sees another user’s page. It helps membership and community sites where most visitors are logged in. Leave it off when pages change often for the same user (carts, notifications, dashboards), or when the site has a very large number of active users, because each user adds their own set of cache files.
Gzip Compression #
Saves cached pages compressed and sends them with Content-Encoding: gzip. Default: off. Most hosts already compress responses in the web server (gzip or Brotli), so you usually do not need it. To check, look for a content-encoding response header on your pages while this option is off.
Cache Lifespan #
How long a cached page stays valid. Default: 24 hours. A scheduled task removes expired files. Powered Cache already clears the affected pages whenever you publish or change content, so a long lifespan is safe for most sites. Choose a shorter one if pages show time-sensitive content that WordPress cannot detect as changed, such as data loaded from an external service.
Object Cache #
Object caching is a separate feature. It speeds up the dynamic parts of WordPress, including pages that cannot be page-cached. See Object caching.
What is not cached #
To keep personal and dynamic content safe, Powered Cache does not cache:
- Requests other than
GET, such as form submissions. - The WordPress admin, the login page and other
.phpfiles (such aswp-cron.phpandxmlrpc.php),.xmlfiles androbots.txt. - Logged-in visitors, unless Logged-in User Cache is on.
- Visitors who have left a comment, so they can see it while it waits for approval.
- Search results, 404 pages, password-protected posts, and any response with a status other than 200.
- URLs with a query string, unless the parameter is listed in Ignored Query Strings or Cache Query Strings.
- Pages where a plugin defines the
DONOTCACHEPAGEconstant. WooCommerce does this on cart, checkout and account pages. - Posts with Don’t cache this post checked in the editor. See Exclude a page from the cache.
- Requests matched by your cache rules: rejected user agents, cookies and referrers, and Never Cache URLs.
- Any request while Development Mode is on.
Feeds and public REST API responses are cached like pages and are cleared together with the content they belong to.
When the cache is cleared automatically #
You do not need to clear the cache after every change. Powered Cache clears the affected pages when:
- A post or page is published, updated, unpublished, trashed or deleted. This clears the post itself, the home page, the posts page, its category, tag and other term archives (including parent terms), its author archive, its post type and date archives, and the related feeds.
- A comment is approved, unapproved or edited. This clears that post.
- A category, tag or other term is created, edited or deleted.
- You switch themes. This clears the whole cache.
To clear other URLs together with a post, for example a landing page that lists recent posts, add them to Purge Additional Pages. To clear the cache by hand, see Clearing the cache.
Changed in 4.1: Moving a post to the trash or deleting it now clears its cached pages right away and removes its URLs from the preload queue. Before 4.1, a trashed post could stay in the cache until it expired.
Check that a page is cached #
- Open the page in a private browser window, so you are logged out. Reload it once.
- Open your browser’s developer tools, go to the Network tab and select the page request.
- Check the response headers:
X-Powered-Cache: PHP: the page came from the cache.X-Powered-Cache: MISS: WordPress built the page.X-Powered-By: Powered Cacheand noX-Powered-Cacheheader: the web server sent the cached file directly through the.htaccessrules.
You can also view the page source. While Cache Footprint is on (Powered Cache → Tools), cached pages end with an HTML comment such as <!-- Cache served by Powered Cache -->.
If the header says MISS every time, add the following line to wp-config.php. Responses then include an X-Powered-Cache-Miss-Reason header that explains why the page was not cached.
define( 'POWERED_CACHE_MISS_REASON', true );
For common reasons and fixes, see Page is not being cached.
Related docs #
- Cache Preload: build cached pages before visitors arrive.
- Advanced cache rules: exclude URLs, cookies and user agents, and control query strings.
- Clearing the cache
- Object caching
- Server configuration (Apache, Nginx, LiteSpeed)