Features Pricing Docs Blog Log In Get Started Free

LiteSpeed Cache Plugin Configuration

Configuring the LiteSpeed Cache Plugin

The LiteSpeed Cache (LSCache) plugin is the recommended caching solution for WordPress on OpenLiteSpeed. It integrates directly with the OLS cache engine for maximum performance.

Installation

sudo wp plugin install litespeed-cache --activate --path=/home/DOMAIN/public_html --allow-root

BlitzPress pre-installs this plugin on all new sites.

Recommended Cache Settings

Navigate to LiteSpeed Cache > Cache in WordPress admin:

  • Enable Cache: ON
  • Cache Logged-in Users: OFF (unless you need per-user caching)
  • Cache Commenters: OFF
  • Cache REST API: ON
  • Cache Mobile: OFF (unless your theme has a separate mobile version)

TTL Settings

Under LiteSpeed Cache > Cache > TTL:

Setting Recommended Value Notes
Default Public Cache 604800 (7 days) Auto-purges on content changes
Default Front Page 604800 Purged when new post is published
Feed TTL 0 Do not cache feeds
404 Page TTL 3600 Cache 404s for 1 hour

Browser Cache

Enable browser caching under LiteSpeed Cache > Cache > Browser:

  • Browser Cache: ON
  • Browser Cache TTL: 31536000 (1 year for static assets)

Purge Settings

Under Purge, ensure these are enabled:

  • Purge All On Upgrade
  • Auto Purge Rules: Front Page, Home Page, Pages, Categories

CDN Integration

If using Cloudflare, configure under LiteSpeed Cache > CDN:

  1. Enable Cloudflare API
  2. Enter your Global API Key or API Token
  3. Enter your domain
  4. Enable auto-purge on Cloudflare when LSCache purges

Crawler

The LSCache Crawler pre-fills the cache by visiting pages on a schedule. Configure under Crawler:

  • Crawler: ON
  • Crawl Interval: 302400 (3.5 days)
  • Server Load Limit: 1 (pause crawling when server load exceeds this)

The crawler generates a sitemap-based list of URLs and visits each one to warm the cache.

Optimization Features

LSCache also offers CSS/JS optimization, image optimization (via QUIC.cloud), and critical CSS generation. Enable these gradually and test each one — some may conflict with specific themes or plugins.