---
title: Page Caching
description: "Learn how Powered Cache page caching works in WordPress, which pages are cached, how mobile and logged-in options affect it, and how to confirm a cache hit."
url: "https://poweredcache.com/docs/page-caching/"
updated: "2026-12-02"
category: Caching
---

# Page Caching

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:

1. **First visit (cache miss):** WordPress builds the page as usual, and Powered Cache saves the HTML in `wp-content/cache/powered-cache/`.
2. **Next visits (cache hit):** the saved file is returned right away, without loading WordPress.
3. **Content changes or the cache expires:** the saved copy is removed, and the next visit creates a fresh one. Turn on [Cache Preload](/docs/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](/docs/server-configuration/).

## Enable page caching

1. Go to **Powered Cache → Cache**.
2. Turn on **Page Cache** (*Serve cached pages*).
3. Click **Save Settings**.
4. Open your site in a private browser window and [check that the page is cached](#verify).

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](/docs/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](/docs/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 `.php` files (such as `wp-cron.php` and `xmlrpc.php`), `.xml` files and `robots.txt`.
- Logged-in visitors, unless [Logged-in User Cache](#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](/docs/advanced-cache-rules/#ignored-query-strings) or [Cache Query Strings](/docs/advanced-cache-rules/#cache-query-strings).
- Pages where a plugin defines the `DONOTCACHEPAGE` constant. 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](/docs/exclude-page-from-cache/).
- Requests matched by your [cache rules](/docs/advanced-cache-rules/): rejected user agents, cookies and referrers, and Never Cache URLs.
- Any request while [Development Mode](/docs/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](/docs/advanced-cache-rules/#purge-additional-pages). To clear the cache by hand, see [Clearing the cache](/docs/clear-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

1. Open the page in a private browser window, so you are logged out. Reload it once.
2. Open your browser's developer tools, go to the **Network** tab and select the page request.
3. 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 Cache` and no `X-Powered-Cache` header: the web server sent the cached file directly through the `.htaccess` rules.

You can also view the page source. While [Cache Footprint](/docs/check-cache-status/#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](/docs/page-not-cached/).

## Related docs

- [Cache Preload](/docs/cache-preload/): build cached pages before visitors arrive.
- [Advanced cache rules](/docs/advanced-cache-rules/): exclude URLs, cookies and user agents, and control query strings.
- [Clearing the cache](/docs/clear-cache/)
- [Object caching](/docs/object-caching/)
- [Server configuration (Apache, Nginx, LiteSpeed)](/docs/server-configuration/)
