LiteSpeed Cache and WooCommerce: Settings for Online Stores

LiteSpeed Cache works well with WooCommerce and can make product and category pages load almost instantly, while carts and checkouts stay personal to each shopper. This guide covers the LiteSpeed Cache settings for WooCommerce stores: what the plugin handles automatically, which options to check, how far to push optimization, and how to fix a cart that shows the wrong contents.

What LiteSpeed Cache does for WooCommerce automatically

When the plugin detects WooCommerce, it applies store-safe rules without any setup:

  • The Cart, Checkout and My Account pages are never cached. You don't need to exclude them yourself.
  • The cart itself is personal to each shopper. Shoppers never see someone else's cart contents.
  • Logged-in customers get their own private cache, never a copy meant for someone else.
  • When a product's stock or quantity changes (including after an order), the product page is purged so visitors see the current stock status.

Make sure WooCommerce knows which page is which. In WordPress, go to WooCommerce > Settings > Advanced and check that the Cart page, Checkout page and My account page are set to the right pages. If you built a custom checkout on a different page, that page won't be recognized; exclude it as described in the guide on excluding pages.

The WooCommerce settings in LiteSpeed Cache

In WordPress, go to LiteSpeed Cache > Cache and click the WooCommerce tab.

SettingWhat it doesRecommendation
Product Update IntervalHow much to purge when stock changes.Keep the default, "Purge product on changes to the quantity or stock status. Purge categories only when stock status changes." If your category pages show stock quantities, choose the option that also purges categories on every stock change.
Vary for Mini CartKeeps a separate cached copy for shoppers with items in their cart.Leave OFF. Turn it ON only if the header cart icon shows the wrong count or items (see Troubleshooting).

Click Save Changes and purge the cache after changing either one.

Which preset to use for an online store

Start with the Essentials or Basic preset under LiteSpeed Cache > Presets. Basic and higher use LiteSpeed's free QUIC.cloud service for some features; connect under LiteSpeed Cache > General with Enable QUIC.cloud services. Stores have more moving parts than a blog, so be cautious with Aggressive and Extreme.

If you want more speed from CSS and JavaScript optimization, turn it on step by step (see the minify guide) and keep your checkout safe:

  1. Go to LiteSpeed Cache > Page Optimization > Tuning.
  2. In URI Excludes, add these lines (adjust if your pages use different addresses):
    /cart/
    /checkout/
    /my-account/
  3. Click Save Changes and purge all.

This leaves the pages where payment scripts run untouched by minify, combine and delay. Payment gateways (Stripe, PayPal, Square and others) load scripts that often break if they're combined or delayed.

Settings to avoid on a store

  • Object Cache (Cache > Object tab): leave OFF. Redis and Memcached aren't available on our shared plans.
  • Crawler: not available on shared hosting. Pages are cached on their first visit.
  • Load JS Deferred set to Delayed: can make "Add to cart" buttons, variation pickers and mini carts feel unresponsive until the visitor scrolls. Use Deferred or leave it off.
  • Cache Logged-in Users: leave it at the default.

Test your store after any change

Use a private browser window (not logged in) and walk through a real purchase path:

  1. Open a product, pick a variation (size, color), and click add to cart.
  2. Check the cart icon in the header updates.
  3. Go to the cart, change a quantity, apply a coupon if you use them.
  4. Go to checkout and make sure the payment fields load. If your gateway has a test mode, place a test order.
  5. Repeat the first steps on a phone.

Troubleshooting

The mini cart in the header shows the wrong number of items

Most themes update the header cart with JavaScript, so caching doesn't affect it. If yours doesn't, go to LiteSpeed Cache > Cache > WooCommerce, turn Vary for Mini Cart ON, save and purge all. If it's still wrong, check whether JS Delayed or JS Combine is on, since those can stop the cart script from running.

Stock status or prices are out of date

Product pages are purged when stock changes, but price changes made by some bulk-edit or import plugins don't always trigger a purge. Use Purge All from the LiteSpeed admin bar menu after a bulk update.

Checkout or payment fields won't load

This is nearly always CSS/JS optimization. Add your checkout page to URI Excludes as shown above, purge all and try again. To confirm, load the page with ?LSCWP_CTRL=before_optm on the end of the address.

A currency or language switcher shows the wrong currency

Switchers that use a cookie need that cookie added to Cache > Excludes > Do Not Cache Cookies. Check the switcher plugin's documentation for its cookie name, or open a ticket and the Instant Access Internet Services team will help.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • litespeed cache woocommerce, woocommerce cache settings, woocommerce cart not updating, litespeed cache mini cart, speed up woocommerce, woocommerce checkout cache
  • 0 用戶發現這個有用
這篇文章有幫助嗎?

相關文章

How to Speed Up WordPress with LiteSpeed Cache

Instant Access Internet Services servers run the LiteSpeed web server, so the fastest way to...

What Is LiteSpeed? How Our Web Server Makes Your Website Faster

Every website we host runs on the LiteSpeed web server, a faster drop-in replacement for Apache....

How to Turn On LiteSpeed Cache with the Web Cache Manager in cPanel

You can turn on LiteSpeed Cache for WordPress without logging in to WordPress at all. The...

Best LiteSpeed Cache Settings for WordPress (Using Presets)

The easiest way to get the best LiteSpeed Cache settings for WordPress is to use the plugin's...

How to Clear (Purge) the LiteSpeed Cache in WordPress

If you've updated your WordPress site but visitors still see the old version, you need to clear...