Skip to content

LiteSpeed Cache WordPress plugin: install and initial configuration

Install LSCWP from the WordPress plugin directory, wire the API key, and set the baseline cache options that make the plugin effective from day one.

LiteSpeed Cache for WordPress (LSCWP) is the plugin that connects WordPress to the server-side LSCache engine built into LiteSpeed Web Server and OpenLiteSpeed. Without it the server cache is idle and WordPress is serving every page through PHP. This article is for site owners or operators who are installing LSCWP for the first time on a LiteSpeed-backed host, and covers installation, the API key handshake, and the initial settings that matter before anything else.

How to verify

Before installing, confirm the server is actually running LiteSpeed so the plugin has something to talk to:

# From the shell
/usr/local/lsws/bin/lshttpd -v

# Or inspect a response header
curl -sI https://example.com | grep -i x-powered-by

After activation, verify LSCache is accepting requests:

curl -sI https://example.com | grep -i x-litespeed-cache
# Expected: X-LiteSpeed-Cache: miss  (first hit), then  hit  on repeat

From WP-CLI:

wp plugin list --status=active | grep litespeed
wp option get litespeed.conf.cache

What’s happening

LSCWP is a two-sided plugin. On the WordPress side it hooks into page rendering, cookie detection, user-role logic, and the WordPress caching API. On the server side it sends Vary headers and cache-control directives that the LiteSpeed server reads to decide what to store, for how long, and under which variations.

The API key is not a licence check — it unlocks LiteSpeed’s cloud services (image optimisation, critical CSS generation, CDN) and ties the domain to your account on ls.quic.cloud. The on-server cache works without the key, but the cloud features are disabled until the domain is verified.

The plugin stores its configuration in wp_options under keys prefixed with litespeed.conf.. Changes made through the WordPress dashboard write to the database immediately. There is no separate file to sync; the server reads the directives from WordPress-set response headers at runtime.

The procedure

Step 1 — Install the plugin.

In the WordPress admin, go to Plugins - Add New, search for “LiteSpeed Cache,” install, and activate. Alternatively:

wp plugin install litespeed-cache --activate

Step 2 — Request an API key.

Go to LiteSpeed Cache - General - Domain Key and click Request. LSCWP pings api.ls.quic.cloud, which validates that the domain resolves to a LiteSpeed server. The key arrives by email and is then entered in the same field. If the server is behind Cloudflare or a CDN, the validation check may fail; temporarily disable proxy mode or use the DNS validation path instead.

Step 3 — Set baseline cache settings.

Navigate to LiteSpeed Cache - Cache. Enable the following at minimum:

  • Enable Cache - On
  • Cache Logged-in Users - Off (unless you have a specific reason; caching logged-in sessions leaks user-specific content)
  • Cache Commenters - Off
  • Login Cookie - Leave blank unless you are on a multi-server setup; enter the cookie name that indicates a logged-in session so LiteSpeed does not cache those requests
  • Cache TTL - 604800 (7 days) is safe for most sites; reduce to 86400 (1 day) for sites with frequent content changes

Step 4 — Exclude dynamic paths.

Add the following to LiteSpeed Cache - Cache - Excludes:

/cart
/checkout
/my-account
/wp-admin
/wp-login.php

WooCommerce and membership sites need additional exclusions; these defaults protect the most common dynamic pages.

Step 5 — Configure the crawler.

The crawler warms the cache proactively so the first visitor after a purge does not trigger a PHP request. Go to LiteSpeed Cache - Crawler, enable it, set the crawl interval to 600 seconds, and save. The crawler respects robots.txt by default.

Step 6 — Flush and test.

# From WP-CLI
wp litespeed-purge all

# Confirm cache is serving
curl -sI https://example.com | grep -i x-litespeed-cache

The second request to any URL should return X-LiteSpeed-Cache: hit.

Common pitfalls

Plugin active but no cache hits. The server is not running LiteSpeed. cPanel hosts can switch between Apache and LiteSpeed - confirm with lshttpd -v. Shared hosts sometimes advertise LiteSpeed but run it only on certain plans.

API key request fails. The domain must resolve to the server IP directly. If Cloudflare or another proxy is in front, disable proxy mode temporarily during key request, or use the DNS verification method available in LSCWP 5.x.

Logged-in users see cached pages. Cache Logged-in Users is enabled and the Login Cookie field is empty. Either disable that option or set the correct cookie name (wordpress_logged_in is the default prefix).

Cart page is cached. WooCommerce sets woocommerce_items_in_cart and similar cookies, which LSCWP uses to bypass cache automatically - but only if WooCommerce integration is on. Go to LiteSpeed Cache - WooCommerce and confirm “Cache Cart” is Off.

Purge does not propagate. On multi-server or CDN setups, the purge API key must be the same across all nodes. Check LiteSpeed Cache - General - Purge All on Upgrade and confirm the purge request reaches each origin.


Stack Harbor manages LSCWP installation, API key configuration, and ongoing cache tuning as part of standard environment work. If you are standing up LiteSpeed on a new environment or need the plugin configured correctly before launch, the knowledge base covers the full LiteSpeed stack, and managed operations keeps the configuration sound after deployment.