Online shops gain the most from caching: fast product pages convert better. They also have the most to lose if caching goes wrong, such as one customer's cart showing to another. The LiteSpeed Cache plugin understands WooCommerce, so the defaults are safe. This guide explains what happens and which settings to adjust.
Before you start
- WooCommerce and LiteSpeed Cache installed (see configuring LiteSpeed Cache).
- Test products and a way to place a test order.
What LiteSpeed Cache does for WooCommerce automatically
- Shop, category and product pages are cached for guests.
- Cart, checkout and My Account pages are never cached.
- When a visitor adds an item to the cart, WooCommerce sets a cookie and LiteSpeed serves that visitor uncached or private pages, so carts are always correct.
- Product pages are purged automatically when you edit a product or stock changes.
Check the WooCommerce settings
Go to LiteSpeed Cache → Cache → WooCommerce (shown when WooCommerce is active).
| Setting | Recommended | Why |
|---|---|---|
| Product Update Interval | Purge product and categories only when stock status changes | Avoids purging on every sale while keeping "out of stock" accurate. |
| Use Front Page TTL for the Shop Page | On if the shop is your home page | Keeps the shop page fresh. |
| Privately Cache Cart | On | Logged-in or cart-holding visitors get a private cached copy. |
ESI for mini carts and personal widgets
Edge Side Includes (ESI) let LiteSpeed cache a page publicly while punching holes for personal parts, such as the mini cart in the header or a "Hello, name" greeting. Turn it on in LiteSpeed Cache → Cache → ESI with Enable ESI set to On. It works best with themes that use standard WooCommerce widgets.
Note: ESI is a LiteSpeed Enterprise feature. MdmHost servers run LiteSpeed Enterprise, so it is available.
Settings to treat carefully
- Cache Logged-in Users: safe with WooCommerce because personal pages are excluded, but test My Account and order pages.
- JS Delayed (Page Optimization): can break add-to-cart buttons, variation selectors and payment scripts. Exclude WooCommerce and payment gateway scripts (see page optimisation).
- Do Not Cache URIs: add custom checkout steps or payment callback URLs from plugins.
Test the shop
- In a private window, open a product page and check for
x-litespeed-cache: hitin the response headers on the second load. - Add the product to the cart. The cart page should show the product, and the header mini cart should update.
- Open a second browser; its cart should be empty.
- Complete a test order and confirm stock decreases on the product page.
Troubleshooting
Mini cart shows the wrong count
Enable ESI, or exclude the theme's cart fragment from JS optimisation. Purge all afterwards.
Prices or currency do not change per visitor
Currency switcher plugins need a cache vary. Add the plugin's cookie name in Cache → Excludes → Do Not Cache Cookies or use its LiteSpeed integration.
Checkout is slow
Checkout is never cached, so speed depends on PHP and the database. Use a recent PHP version (see changing PHP version).
Frequently asked questions
Can customers see each other's carts?
Not with the default rules. Visitors with a cart cookie never receive the shared cached page. Problems only appear when custom rules override the defaults.
Should I use the crawler on a large shop?
Only if your plan has spare resources. On shared hosting, a crawler on thousands of products can hit CloudLinux limits; limit it to key pages.
