Back to tutorials
Tutorial

LiteSpeed Cache Setup Guide Tutorial (2026): Speed Up WordPress on a VPS Without Breaking WooCommerce

LiteSpeed Cache setup guide tutorial for 2026: configure QUIC.cloud, cache rules, and WooCommerce exclusions on your VPS.

By Anurag Singh
Updated on Oct 10, 2026
Category: Tutorial
Share article
LiteSpeed Cache Setup Guide Tutorial (2026): Speed Up WordPress on a VPS Without Breaking WooCommerce

LiteSpeed can take a sluggish WordPress site and make it feel snappy. That only happens when your cache rules match how WordPress serves pages. This LiteSpeed Cache setup guide tutorial walks through a production-safe VPS setup: correct headers, predictable purges, WooCommerce-safe exclusions, and simple before/after checks you can repeat.

You’ll use LiteSpeed Web Server (usually via CyberPanel, cPanel with LiteSpeed, or a standalone LSWS license) plus the LiteSpeed Cache WordPress plugin (LSCache). The goal is practical: fewer PHP executions, lower CPU spikes, and steady TTFB as traffic ramps up.

What you’ll need before you touch caching

  • A VPS or dedicated server where you control the stack. If you’re moving up from shared hosting, start with a HostMyCode VPS so you can adjust caching, PHP limits, and memory without account-level caps.
  • WordPress admin access for the site you’ll optimize.
  • LiteSpeed Web Server (LSWS) or OpenLiteSpeed (OLS). LSCache works with both, but some enterprise features differ.
  • HTTPS already working (Let’s Encrypt or a paid cert). If HTTPS isn’t stable yet, fix that first using the SSL certificate setup guide tutorial.

Step 1: Confirm you’re actually running LiteSpeed

Don’t guess. Check the server header first.

Then confirm LSCache can talk to the web server.

  1. From your local machine, check headers:

    curl -I https://example.com/ | egrep -i 'server:|x-powered-by:|x-litespeed-cache'

    You want to see Server: LiteSpeed or Server: OpenLiteSpeed. Once LSCache is working, you’ll also see cache headers like X-LiteSpeed-Cache.

  2. In WordPress, install the plugin:

    • WP Admin → Plugins → Add New → search “LiteSpeed Cache” → Install → Activate
  3. Open LSCache settings:

    • WP Admin → LiteSpeed Cache → Dashboard

    If the plugin can’t communicate with LiteSpeed, stop and fix the stack.

    Common causes include reverse proxies that hide or strip headers. Another common cause is Apache/Nginx sitting in front of WordPress while a control panel UI makes it look like LiteSpeed is active.

Step 2: Take a baseline snapshot (so you can prove the win)

You don’t need elaborate tooling. You need repeatable checks that make regressions obvious.

  • Measure TTFB (3 times, record best/median):

    curl -o /dev/null -s -w 'TTFB:%{time_starttransfer} Total:%{time_total}\n' https://example.com/
  • Check PHP pressure while loading pages (on the server):

    sudo top -o %CPU

    On a busy site, PHP workers will jump. Good caching cuts PHP hits per minute.

  • Write down a “known slow” URL list (homepage, category, product page). You’ll rerun the same checks after each change.

If the VPS already struggles, fix the obvious bottleneck first (I/O wait, memory pressure). Caching won’t rescue a saturated disk.

Use the VPS performance troubleshooting tutorial to find the real constraint.

Step 3: Configure LSCache the safe way (the settings that matter)

LSCache has a lot of switches. Early on, ignore the “clever” ones.

Get correctness first. Focus on who gets cached, what gets cached, and what triggers a purge.

3.1 Enable caching and set sane defaults

  1. WP Admin → LiteSpeed Cache → Cache

    • Enable Cache: ON
    • Cache Logged-in Users: OFF (start conservative)
    • Cache Commenters: OFF
    • Cache REST API: OFF unless you know why you need it
  2. WP Admin → LiteSpeed Cache → Cache → TTL

    • Default Public Cache TTL: 3600 (1 hour) is a good start
    • Default Private Cache TTL: 1800 (30 minutes)

    Very long TTLs can hide purge mistakes until they hurt.

    Start at one hour. Extend later if cache rebuilds feel too frequent.

3.2 Turn on browser cache (cheap win)

WP Admin → LiteSpeed Cache → Browser

  • Browser Cache: ON

This sets cache headers for static files. Repeat visitors download fewer assets.

Real-user performance usually improves.

3.3 Set up purges that won’t leave stale WooCommerce pages

WP Admin → LiteSpeed Cache → Cache → Purge

  • Purge All On Upgrade: ON
  • Auto Purge Rules For Publish/Update: keep defaults, but ensure Front Page, Pages, Posts, and relevant taxonomies are included

Keep purges tight. Purge the smallest correct set on routine edits.

Save full purges for theme/plugin updates and template changes.

Step 4: Make WooCommerce safe (cart, checkout, and “my account”)

WooCommerce issues usually come from caching sessions or optimizing scripts too aggressively.

LSCache covers many defaults, but you should still confirm what’s active.

  1. WP Admin → LiteSpeed Cache → Cache → Excludes

    Confirm these are excluded (either by default or by your rules):

    • /cart/
    • /checkout/
    • /my-account/
  2. Under Do Not Cache Cookies, ensure WooCommerce cookies are excluded. Common ones include:

    • woocommerce_items_in_cart
    • woocommerce_cart_hash
    • wp_woocommerce_session_

    If you use custom checkout or membership plugins, review their cookies too.

    Any cookie that represents user/session state should usually bypass page cache.

  3. Quick functional test (do this now):

    • Open an incognito window, add a product to cart, refresh, then proceed to checkout.
    • Open a second incognito session and confirm carts are not “leaking” between sessions.

Step 5: Add QUIC.cloud CDN (optional) without DNS surprises

QUIC.cloud is a straightforward option for edge caching on LiteSpeed sites. It’s useful if you serve international traffic or ship lots of media.

If most visitors are local and your VPS is nearby, you may not need it.

  1. WP Admin → LiteSpeed Cache → General

    • Domain Key: request one (plugin will guide you)
  2. WP Admin → LiteSpeed Cache → CDN

    • Enable QUIC.cloud CDN: ON
  3. DNS check before you enable proxying:

    • Make sure your apex/root and www records are correct.
    • If you’re already using another CDN or proxy, don’t stack them blindly.

    If you recently changed DNS providers or edited records, wait for propagation.

    Then verify what users actually resolve to.

    A messy cutover often gets blamed on “cache” because different users hit different edges. If you prefer keeping DNS and renewals together, HostMyCode domains are straightforward to manage: HostMyCode Domains.

Step 6: Page optimization settings that won’t backfire

Minification and defer/async options can help. They can also break layouts, cookie banners, and checkout scripts.

Start small. Test. Then expand.

6.1 Turn on HTTP/3 and basic optimizations (server-level)

If you’re on LiteSpeed with QUIC enabled, HTTP/3 can cut handshake latency on mobile networks.

Enable it in your LiteSpeed admin or control panel if it’s available. Then verify:

curl -I --http3 https://example.com/

If your curl build doesn’t support HTTP/3, use browser devtools (Network tab → protocol column).

6.2 Safe plugin-level optimization starter pack

WP Admin → LiteSpeed Cache → Page Optimization

  • CSS Minify: ON (test carefully)
  • JS Minify: ON (test carefully)
  • HTML Minify: ON
  • Combine CSS/JS: OFF to start (HTTP/2+ reduces the need)
  • Load CSS Asynchronously: OFF initially (turn on later if you have time to QA)

After enabling minification, check the areas that usually break first:

  • Homepage above-the-fold layout
  • Mobile menu
  • Add to cart
  • Checkout payment step

6.3 Image optimization without waiting for “magic”

WP Admin → LiteSpeed Cache → Image Optimization

  • Auto Request Cron: ON
  • Optimize Original Images: ON (for most sites)
  • Generate WebP: ON
  • Image WebP Replacement: ON

If WebP generation stalls, it’s often scheduling. Low-traffic sites don’t trigger WP-Cron reliably.

On a VPS, replace WP-Cron with a system cron using the WordPress Cron Job Tutorial.

Step 7: Enable object cache (Redis) only if your stack supports it

Page caching mainly helps anonymous traffic. Object caching helps requests that still hit PHP.

That includes admin, search, account pages, and other dynamic views.

On WooCommerce stores, Redis can cut database reads. It only helps if it stays stable under memory pressure.

If Redis is already running on the server, enable it in WP Admin → LiteSpeed Cache → Cache → Object.

If it isn’t running, don’t force it onto a small VPS with tight RAM. Redis needs headroom.

  • Object Cache: ON
  • Method: Redis
  • Default Object Cache TTL: 360

If WP admin suddenly feels slower, object cache is an easy suspect. Disable it temporarily and retest.

If performance snaps back, check Redis memory usage and whether it’s evicting keys.

Step 8: Verify caching is working (headers, variations, and bypasses)

Skip the guesswork. Read the headers.

Then confirm that sensitive endpoints bypass cache.

  1. Test homepage cache status twice:

    curl -I https://example.com/ | egrep -i 'x-litespeed-cache|x-qc-cache|cache-control|vary'
    # run again
    curl -I https://example.com/ | egrep -i 'x-litespeed-cache|x-qc-cache|cache-control|vary'

    Typical outcomes:

    • First request: MISS
    • Second request: HIT
  2. Confirm cart/checkout are not cached:

    curl -I https://example.com/cart/ | egrep -i 'x-litespeed-cache|cache-control'
    curl -I https://example.com/checkout/ | egrep -i 'x-litespeed-cache|cache-control'

    You generally want no-cache behavior for these endpoints.

  3. Check logged-in behavior:

    • Log into WP admin, open the site in a new tab, and ensure LSCache isn’t caching your personalized pages unless you explicitly enabled it.

Step 9: Common LiteSpeed cache problems (and the fast fixes)

Most failures fall into two buckets: you’re not caching at all, or you’re caching the wrong thing.

Problem: Everything stays MISS

  • Cause: You’re behind a proxy that strips LiteSpeed headers, or your server isn’t LiteSpeed.
  • Fix: Verify the Server: header and plugin dashboard status. If you run a reverse proxy, ensure it forwards headers. Also make sure it doesn’t force Cache-Control: no-cache.

Problem: Logged-in users see stale content

  • Cause: Logged-in caching enabled without proper vary/cookie rules.
  • Fix: Turn off “Cache Logged-in Users” and purge all. Then reintroduce with caution.

Problem: Checkout breaks, payment widget doesn’t load

  • Cause: Over-aggressive JS optimization or cached checkout endpoints.
  • Fix: Disable JS minify temporarily. Add exclusions for the affected script(s) under Page Optimization → Tuning.

Problem: Sudden CPU spikes after enabling cache

  • Cause: Cache stampede (many requests regenerating at once), or a purge loop from a plugin.
  • Fix: Reduce purge scope, set a moderate TTL, and inspect for plugins that purge on every view.
  • Fix: If your VPS is already resource tight, use the VPS Disk I/O Troubleshooting Tutorial to rule out disk wait masquerading as CPU load.

Step 10: Production checklist (copy/paste before you go live)

  • Cache enabled for guests; logged-in cache off unless tested.
  • Cart/checkout/account excluded; WooCommerce cookies excluded.
  • Minification enabled only after QA of menus, forms, and checkout.
  • WebP enabled; background optimization scheduled with real cron if needed.
  • Purge rules set to avoid full-site purges on minor updates.
  • Header tests show HIT on second request for public pages.
  • Backups verified before major changes (theme/plugin updates).

Summary: the configuration that usually wins in real hosting

The setup that holds up in production is boring on purpose. Cache public pages. Protect user-specific flows.

Add optimizations one change at a time.

The biggest early gains usually come from guest caching and browser caching.

After that, confirm purges behave the way you expect.

If you want consistent results, run WordPress on a VPS where you control PHP workers, memory, and storage performance. For larger WooCommerce stores, step up to HostMyCode dedicated servers when you need to eliminate “noisy neighbor” contention.

If you’re tuning WordPress for speed and stability, start with a VPS that gives you predictable CPU and RAM headroom. A managed VPS hosting plan from HostMyCode keeps updates, security baselines, and day-to-day troubleshooting handled while you focus on the site.

Already have a site elsewhere? Use HostMyCode migrations to move WordPress to a LiteSpeed-ready VPS with minimal downtime and fewer surprises.

FAQ

Does LiteSpeed Cache work on shared hosting?

It can, but the server must run LiteSpeed or OpenLiteSpeed. On shared hosting, you usually can’t control server-level caching policies, Redis, or HTTP/3. Results vary.

Should I use LSCache plus another cache plugin?

No. Run one page cache. Two WordPress-level caching layers tend to fight over purge rules, serve stale pages, and produce confusing headers.

What’s the quickest way to confirm LSCache is actually caching?

Run curl -I twice on the same public URL and look for cache headers switching from MISS to HIT.

Why did my site get slower after enabling optimization?

JS/CSS optimization can add overhead. It can also break critical render paths if you push it too far. Turn off combine/async settings first, retest, then re-enable one toggle at a time.

How often should I purge cache on a WooCommerce site?

Purge on product updates, price changes, and template changes. Avoid “purge everything” on every small action; it increases churn and can trigger CPU spikes.