WP Rocket Exclude Pages From Cache - URLs, Patterns and Cookies (2026)

Some pages shouldn't be cached, like account dashboards or pages that change for every visitor. WP Rocket lets you exclude them one by one, by pattern, or by cookie.

When You Should Exclude a Page

Page caching saves one copy of a page and serves it to everyone. That's perfect for articles and product pages, and wrong for pages that show different content to each visitor.

Exclude a page when it shows personal or changing content: account dashboards, carts, checkouts, membership areas, booking forms with live availability or pages with personalized offers.

Pages WP Rocket Excludes Automatically

Illustration for Pages WP Rocket Excludes Automatically on the WP Rocket Exclude Pages From Cache page, showing a server diagram

You don't need to exclude common e-commerce pages yourself. WP Rocket automatically excludes cart, checkout and account pages for supported e-commerce plugins like WooCommerce and Easy Digital Downloads.

It also respects the DONOTCACHEPAGE constant that many plugins use to signal that a page shouldn't be cached. Logged-in users aren't served cached pages unless you enable User Cache.

Method 1: Exclude a Single Page From the Editor

  1. Open the page or post

    Edit it in WordPress.

  2. Find WP Rocket's options

    Look for the WP Rocket options box in the editor's sidebar or below the content.

  3. Tick Never cache this page

    The page will be excluded from caching and optimizations.

  4. Update the page

    Then clear WP Rocket's cache.

If you don't see the WP Rocket box, check the editor's preferences or panels to make sure it's enabled.

Method 2: Never Cache URL(s)

For several pages, or for pages that aren't regular posts, use the Never Cache URL(s) box in WP Rocket's Cache Rules settings. Enter one URL or pattern per line.

Never Cache URL(s) examples
You Want to ExcludeEnterNotes
One page/my-account/Exact path
All child pages of a section/events/(.*)Excludes /events/anything/ but not /events/ itself
A section and its children/events/ and /events/(.*)Use both lines
Any URL containing a word(.)booking(.)Use sparingly; broad patterns catch more than you expect

Be careful with broad patterns. WP Rocket's docs warn that /(.*) excludes every URL on your site from caching and optimization.

Method 3: Never Cache Cookies

Illustration for Method 3: Never Cache Cookies on the WP Rocket Exclude Pages From Cache page, showing a server diagram

Some plugins set a cookie when a visitor's content should change, such as a currency switcher, a geolocation plugin or a personalization tool. Add that cookie's name to Never Cache Cookies, and WP Rocket won't serve cached pages to visitors who have it.

Check the plugin's documentation for the exact cookie names. Many plugins that personalize content publish the cookies caching plugins should exclude.

Method 4: Never Cache User Agents and Query Strings

User agents: add a user agent to Never Cache User Agent(s) if a specific bot or app should always see a fresh page.

Query strings: by default, URLs with query strings aren't cached. If you want specific query parameters cached, such as filter parameters that create stable pages, add them to Cache Query String(s).

Exclusions for Common Site Types

Typical exclusions by site type
Site TypeUsually Exclude
WooCommerce storeHandled automatically for cart, checkout and account; add wishlist or compare pages if your plugin needs it
Membership or course siteMember dashboards, course progress pages, profile pages
Community or forumProfile, inbox and notification pages
Booking siteLive availability or booking confirmation pages
Multi-currency or multilingual storeAdd the plugin's currency or language cookies to Never Cache Cookies

For membership and community plugins like bbPress, BuddyPress and LearnDash, WP Rocket's documentation suggests adding their dynamic sections to Never Cache URL(s). See also caching for logged-in users.

When Excluding Is the Wrong Fix

Illustration for When Excluding Is the Wrong Fix on the WP Rocket Exclude Pages From Cache page, showing a wrench diagram

Excluding a page removes all of WP Rocket's speed benefits for it. Before you do, check what's actually wrong.

Layout looks broken

Usually Remove Unused CSS or minification. Add a CSS safelist entry or exclude a file instead. See broken layout fixes.

Menu or slider doesn't work

Usually Delay JavaScript. Add a JavaScript exclusion. See Delay JavaScript exclusions.

Form shows an expired security token

Some forms use nonces that expire. Check the form plugin's caching guidance or shorten cache lifespan rather than excluding everything.

Content is outdated

Check Always Purge URL(s) and your host or CDN cache before excluding.

Always Purge URL(s): The Opposite Problem

Sometimes the issue isn't that a page should never be cached, but that it isn't refreshed when related content changes. For example, a custom "Latest deals" page that pulls in new posts may stay stale after you publish.

Add such pages to Always Purge URL(s), and WP Rocket clears them whenever you update any post or page. That keeps the page cached and fast while making sure it updates. Note that this option isn't available on some managed hosts, like WP Engine, where the host controls purging.

Excluding Files Rather Than Pages

Most "this page is broken" problems are caused by one file, not the whole page. WP Rocket lets you exclude individual files from specific optimizations:

File-level exclusions in WP Rocket
ProblemExclusion to Use
A script breaks when delayedDelay JavaScript exclusions, or one-click exclusions for known plugins
A script breaks when deferredExcluded JavaScript files under Load JavaScript deferred
Styles missing after Remove Unused CSSCSS safelist
A file breaks when minifiedExcluded CSS or JavaScript files
An image shouldn't lazy loadExcluded images or iframes

These keep caching and every other optimization active for the page while fixing the one broken element.

Checking an Exclusion Works

Open the excluded page in a private window and view the page source. A cached page includes WP Rocket's footer comment; an excluded page won't. You can also check that no cache file exists for that URL in WP Rocket's cache folder.

WP Rocket Exclude Pages From Cache FAQ

How do I stop WP Rocket caching one page?

Tick Never cache this page in the WP Rocket options box when editing it, or add its URL to Never Cache URL(s).

Does excluding a page from cache also disable optimizations?

Yes. WP Rocket excludes it from caching and all other optimizations.

Do I need to exclude WooCommerce cart and checkout?

No. WP Rocket excludes them automatically for supported e-commerce plugins.

How do I exclude all pages in a folder?

Add a pattern like /folder/(.*) to Never Cache URL(s), plus /folder/ if you want the parent page excluded too.