LiteSpeed Cache + Cloudflare + WooCommerce Best Settings (2026) – Step-by-Step

WooCommerce stores can break easily if caching is configured incorrectly—especially Cart, Checkout, and My Account pages. In this guide, you’ll set up LiteSpeed Cache (LSCache) and Cloudflare the safe way so you can improve speed without causing cart/session/payment issues. This is also ideal for Elementor + WoodMart sites.

litespeed-cache-cloudflare-woocommerce-settings

Exclude cart/checkout/account

Cloudflare Rocket Loader: OFF

Avoid double minify (LSCache OR Cloudflare)

Table of Contents

 


Before You Start (Quick Checklist)

  • LiteSpeed Web Server / OpenLiteSpeed is active on your hosting

  • LiteSpeed Cache plugin is installed and enabled

  • Cloudflare is active for your domain

  • Test that Cart / Checkout / My Account pages work normally before changes

Tip: Apply changes during off-peak hours or on a staging site first.


LiteSpeed Cache Settings (WooCommerce-Safe)

1) Cache → Basic (Must)

  • Enable Cache: ON

  • Cache Logged-in Users: OFF (recommended for WooCommerce safety)

  • Cache Mobile: OFF (keep OFF if your site is responsive)

  • Browser Cache: ON

2) Cache → Excludes (WooCommerce Critical)

Do Not Cache Pages

Add these pages (adjust if your slugs are different):

  • /cart/

  • /checkout/

  • /my-account/

Do Not Cache Cookies

Add:

  • woocommerce_items_in_cart

  • woocommerce_cart_hash

  • wp_woocommerce_session_

Do Not Cache Query Strings (Optional)

If you face add-to-cart caching issues, add:

  • add-to-cart

3) TTL (Safe Defaults)

  • Default Public Cache TTL: 1 day

  • Private Cache TTL: 1 hour (default is fine)

4) Purge (Recommended)

  • Enable purge options that clear home + category/archive pages when products are updated (if available).
    This prevents “product updated but not showing” issues.


Page Optimization (Speed Boost, But Safe)

1) Minify (Safe Start)

  • HTML Minify: ON

  • CSS Minify: ON

  • JS Minify: ON

2) Combine CSS/JS (Be Careful With Elementor/WoodMart)

For many WooCommerce + Elementor sites, combining can break layout or scripts.

  • CSS Combine: OFF (start OFF)

  • JS Combine: OFF (start OFF)

If your site uses HTTP/2 or HTTP/3 (most do), combine is usually unnecessary.

3) Delay JS (Big Win)

  • Delay JS: ON

If checkout/payment scripts stop working, exclude those scripts from Delay JS (examples):

  • Stripe / PayPal scripts

  • WooCommerce checkout fragments

  • Elementor frontend handlers (only if needed)

4) Lazy Load

  • Lazy Load Images: ON

  • Lazy Load Iframes: ON

If your logo/hero image loads late, exclude the first image or specific classes.


Cloudflare Settings (WooCommerce-Safe)

1) SSL/TLS

  • SSL Mode: Full (strict) (recommended if your certificate is valid)

2) Speed

  • Brotli: ON

Avoid double minify:
If LiteSpeed is doing minify, keep Cloudflare Auto Minify OFF to prevent conflicts.

3) Rocket Loader

  • Rocket Loader: OFF (commonly breaks WooCommerce/Elementor scripts)


Cloudflare Cache Rules (Most Important)

WooCommerce requires bypassing cache for dynamic pages and cart sessions.

Create Cache Rules (Rules → Cache Rules):

Bypass Cache (Never Cache) for:

  • *theme-plugin.net/cart*

  • *theme-plugin.net/checkout*

  • *theme-plugin.net/my-account*

  • *theme-plugin.net/wp-admin*

  • *theme-plugin.net/?add-to-cart=*

Set these to Bypass Cache.

Note: Replace theme-plugin.net with your domain if you copy this to another site.


LiteSpeed + Cloudflare PURGE Sync (Best Practice)

If you notice changes not appearing quickly (products updated but still old view), set up LiteSpeed’s Cloudflare integration so purges sync properly.

  • Connect Cloudflare API/token inside LiteSpeed Cache settings (if available)

  • Test: update a product → check if Cloudflare cache is purged automatically


Common Problems & Fixes

Cart is empty / Checkout not updating

  • Confirm Cart/Checkout/My Account pages are in Do Not Cache Pages

  • Confirm WooCommerce cookies are excluded

  • Disable caching for logged-in users

CSS/layout broken (Elementor/WoodMart)

  • Keep Combine CSS/JS OFF

  • Regenerate Critical CSS (if you enabled it)

  • Exclude problematic CSS/JS files from optimization

Payment gateway not loading

  • Keep Rocket Loader OFF

  • Exclude payment scripts from Delay JS

  • Re-test checkout after each change

“Reduce unused CSS” still appears in PageSpeed

  • Elementor/WoodMart often load global CSS. Use:

    • Critical CSS (LiteSpeed)

    • Disable combine

    • Consider loading assets conditionally where possible


Final Checklist

  • Cart/Checkout/My Account are bypassed from cache ✅

  • Rocket Loader is OFF ✅

  • No double minify conflicts ✅

  • Purge works properly after updates ✅

  • Guest + Logged-in tests done ✅


Recommended Setup for Elementor + WoodMart + WooCommerce (Quick Profile)

  • Combine CSS/JS: OFF

  • Minify: ON

  • Delay JS: ON (exclude payment scripts if needed)

  • Rocket Loader: OFF

  • Cache bypass rules for cart/checkout/account: ON


FAQ (Optional – Great for SEO)

Q1: Why can caching break WooCommerce cart and checkout?
Because those pages are dynamic and depend on sessions/cookies. Caching can serve the wrong session to the wrong user.

Q2: Should I enable “Cache Logged-in Users” in WooCommerce?
Usually no. It can cause account/order/session issues.

Q3: Is Cloudflare Rocket Loader safe for WooCommerce?
Most of the time, no. It often breaks important JavaScript used by checkout and page builders.

Q4: Should I use Cloudflare minify if LiteSpeed is already minifying?
No. Double minify can cause CSS/JS conflicts.


Soft CTA (Optional)

If you use premium WordPress themes/plugins for WooCommerce, explore our premium categories for fast downloads and regular updates.