How to exclude a page from Litespeed cache Print

  • cache, litespeed
  • 3

← Back to Caching Guide

You are reading this article because you want to exclude one or more pages from being cached by LiteSpeed Cache in WordPress.

LiteSpeed Cache, How to Exclude Pages from Cache

By default, LiteSpeed Cache attempts to cache as many pages as possible in order to maximise website performance and loading speed.

However, there are situations where certain pages should not be cached.

Common Pages That Should NOT Be Cached

  • Custom forms
  • Dynamic user dashboards
  • Membership/account pages
  • Checkout/cart pages
  • Pages showing live or personalised data
  • Pages under active development/testing

In this guide we will show you two ways to prevent a page from being cached.


Two Available Methods

Simple Method

Best for excluding individual pages directly from the frontend while viewing the page.

  • Quick and easy
  • Ideal for non-technical users
  • No need to remember page URLs

Advanced Method

Allows manual exclusion of URLs and paths inside LiteSpeed settings.

  • Useful for developers
  • Supports multiple exclusions
  • Better for larger websites

Simple Method (Recommended)

  1. Log in to WordPress
  2. Open the page you do not want cached on the frontend of the website
  3. In the top WordPress toolbar, locate the LiteSpeed options
  4. Mark the page as: Non-Cacheable
LiteSpeed Mark Page as Non Cacheable

Marking a page as non-cacheable directly from the frontend


Advanced Method

  1. Log in to WordPress
  2. Navigate to: LiteSpeed Cache > Cache > Exclude
  3. Locate the field called: Do Not Cache URLs or Exclude Settings
  4. Add the URLs or paths you do not want cached

Example Exclusions

/members-area/
/checkout/
/live-dashboard/
LiteSpeed Exclude Cache Settings

Advanced cache exclusion settings in LiteSpeed Cache


Important Notes

Avoid Excessive Exclusions

Excluding too many pages from cache can reduce website performance and increase server load.

Purge Cache After Changes

After adding exclusions, it is recommended to purge LiteSpeed Cache so the new rules apply immediately.


Tip: Most standard WooCommerce cart, checkout, and account pages are automatically excluded from cache by LiteSpeed Cache by default.


Was this answer helpful?

« Back