Recommended settings: blog vs WooCommerce store
The xSpeed Cache settings we recommend for a blog and for a WooCommerce store, one value per setting, with the exclusions that keep checkout working and a test to run after every change.
This page answers one question: what should each xSpeed setting be on my site? It gives one value per setting for two kinds of site. A blog is any content site where every visitor sees the same page. A WooCommerce store has carts, checkout and prices that change. Each value below matches xSpeed Cache 1.4.10. Where a store needs a different value from a blog, the reason is given underneath.
Before you change anything
- Run a speed test on your home page and on one page of each type you care about (a post, or the shop, a product and the checkout). Note the TTFB and LCP. How to run a speed test shows where.
- Change one setting at a time, then check the site. On a store, place a test order (see the checklist at the end).
- If something breaks, turn the last setting back off. Every field has a Reset link to its shipped default.
If you’ve just installed xSpeed, the setup wizard on Balanced gets you most of the left-hand column in one step. The rest is below.
The settings, side by side
| Setting | Blog | WooCommerce store | Where |
|---|---|---|---|
| Page cache | On | On | Page Cache |
| Cache expiry | 168 hours (the default) | 24 hours | Page Cache |
| Separate mobile cache | Off | Off | Page Cache |
| Browser cache | On | On | Browser Cache |
| GZIP | On | On | GZIP |
| Object cache | On (Redis) | On (Redis) | Object Cache |
| Preloader | On, daily | On, daily | Preloader |
| Minify HTML | On | On | Minify |
| Minify CSS | On | On | Minify |
| Minify JavaScript | On, after a check | Off until you’ve placed a test order | Minify |
| Combine CSS / JavaScript | Off | Off | Minify |
| Defer JavaScript | On | On, with the store exclusions below | Minify |
| Delay JavaScript | On | On, with the store exclusions below | Minify |
| Load CSS without blocking | On with Critical CSS (Pro) | On with Critical CSS (Pro) | Critical CSS |
| Lazy-load images, embeds, videos | On | On | Lazy loading |
| Images to load right away | 1 | 1 | Lazy loading |
| Main image rules | Not needed | post_type:product | featured | Preload the hero image |
| Heartbeat | Defaults | Defaults | Heartbeat |
| Automatic database cleanup | Monthly, items ticked | Weekly, items ticked | Database |
The defaults you don’t see in the table, such as the shipped URL and cookie exclusions, stay as they are. Most sites never need to edit them.
Why the store column is different
A blog page is the same for everyone. A store page isn’t quite: the mini-cart, the checkout form and the payment buttons all depend on JavaScript that has to run on time. The store settings protect that JavaScript and keep prices fresh.
Defer and Delay JavaScript: add the store exclusions
Delay JavaScript holds scripts back until the visitor scrolls, taps or types. On a blog that’s the biggest single win. On a store it can stop a payment button from appearing or a variation picker from working until the shopper touches the page. And today Defer and Delay also run on the cart and checkout pages, so those pages need the protection most.
xSpeed doesn’t ship store-specific exclusions yet, so add them yourself. Paste these into Scripts to never defer or delay, one per line:
stripe
paypal
wc-add-to-cart
wc-add-to-cart-variation
wc-cart-fragments
wc-cart
wc-checkout
blocks/checkout-frontend
blocks/cart-frontend
blocks/mini-cart
recaptcha
challenges.cloudflare.com
Each line matches a script’s handle exactly, or any part of its address, before or after minification:
| Line | What it protects |
|---|---|
stripe | Stripe for WooCommerce: the card form, Apple Pay and Google Pay buttons, and Stripe’s own script from js.stripe.com |
paypal | PayPal Payments: the PayPal buttons and the PayPal script they load |
wc-add-to-cart, wc-add-to-cart-variation | Add to cart buttons, and the size/colour picker on variable products |
wc-cart-fragments | The header mini-cart count |
wc-cart, wc-checkout | The classic cart and checkout pages |
blocks/… lines | The block-based cart, checkout and mini-cart |
recaptcha, challenges.cloudflare.com | reCAPTCHA or Cloudflare Turnstile on the checkout form |
Leave out any line for a plugin you don’t use. If you use another payment gateway (Square, Mollie, Klarna, Razorpay…), add a part of its plugin’s folder name, such as woocommerce-square. You can find that in the script’s address in your browser’s developer tools.
Cookie-consent banners need nothing here: xSpeed already loads them straight away. The Minify page covers how exclusions work in more depth.
Minify JavaScript: off until you’ve tested a checkout
Minifying JavaScript rarely breaks a blog, but a store runs more scripts, and a broken one can sit on the checkout page where you won’t see it while browsing. Turn it on only after you’ve placed a test order with it on.
Combine CSS and JavaScript: off on both
Almost every host serves pages over HTTP/2 or HTTP/3, where many small files load in parallel. Combining them into one file makes the first visit no faster, and it makes every returning visitor download the whole bundle again after any change. Leave both off.
Load CSS without blocking: only with Critical CSS
This setting only acts on pages that have critical CSS, which is an xSpeed Pro feature. On pages without it, CSS loads normally, so turning it on alone does nothing. With Pro, turn on Critical CSS first, then this.
The main product image: preload it, don’t lazy-load it
On a product page, the largest thing at the top is usually the product image, and that’s what Google measures as LCP. xSpeed already loads the first image on every page straight away (Images to load right away is 1) and preloads it. On a product page the first image can be a logo or a badge instead of the product photo. Add this line to Main image rules so the product’s own image is always the one preloaded:
post_type:product | featured
featured means the product image you set in WooCommerce. Keep Images to load right away at 1, so the gallery thumbnails below it still lazy-load. After adding the rule, open a product page with a badge or banner above the photo, view the page source, and check the <link rel="preload" as="image"> in the head points at the product photo.
Cache expiry: 24 hours on a store
You don’t need a short expiry to keep prices right. xSpeed clears a product’s pages automatically when its price, stock or stock status changes, including changes from an order, a scheduled sale, the REST API or WP-CLI. It clears:
- the product page (for a variation, its parent product)
- the Shop page
- every category and tag archive the product is in
- your static front page
Saving a product in wp-admin clears the whole site.
So expiry only matters for things xSpeed can’t see. Examples are a “sale ends in 3 hours” countdown, or prices changed directly in the database by an outside sync. 24 hours keeps those from going stale for long. If your prices are synced from outside WooCommerce several times a day, go shorter. A blog can keep the 168-hour default, because publishing or updating a post clears its pages too.
Database cleanup: weekly, and tick what to clean
A store writes far more to the database than a blog: orders, customer sessions, background jobs. Set Automatic cleanup to Weekly on a store and Monthly on a blog.
⚠️ A schedule cleans nothing until you tick items. What to clean automatically starts empty. A safe set to tick: Expired Transients, Spam Comments, Orphan Post Meta and Orphan Comment Meta. Leave revisions and trashed content to review by hand.
xSpeed’s cleanup doesn’t yet include WooCommerce’s own tables: expired customer sessions and the Action Scheduler history (WooCommerce › Status › Scheduled Actions). WooCommerce clears both on its own as long as WP-Cron runs. If the Past-due count on that screen keeps growing, WP-Cron isn’t running, which is a separate problem to fix. The Database page has more.
Separate mobile cache: off on both
A responsive theme sends the same page to phones and computers, so one cached copy is right. Turning this on also has a cost on Nginx and Apache: xSpeed can no longer serve cached pages straight from disk, so every hit goes through PHP. Turn it on only if your theme really shows phones a different page.
Object cache: on, especially on a store
The page cache can’t help logged-in shoppers, the cart, the checkout or wp-admin, because those pages are never stored. An object cache (Redis) speeds up exactly those. On a store it often matters more than any other setting. See How to enable Redis or Memcached.
Store pages that are never cached
Out of the box, xSpeed never stores:
- Cart, checkout and account pages, whatever their address. WooCommerce marks those pages “do not cache” itself, and xSpeed respects that, so a translated or renamed checkout page is safe.
- Any visitor who has something in their cart. WooCommerce’s cart and session cookies are on the default excluded-cookie list.
- WooCommerce’s API and AJAX requests.
The full default lists are on the Page Cache page. You only need to add to them in three cases:
- A checkout on a page WooCommerce doesn’t know about, such as a funnel or one-page checkout built with another plugin. Add that page’s address to Excluded URLs.
- Prices that change with a currency switcher. Add the cookie your currency plugin sets to Excluded Cookies. To find it, switch currency, then look in your browser’s developer tools under Application › Cookies.
- Anything else that shows a visitor’s own data on a public page, such as a “recently viewed” list. Exclude that page, or load the widget with JavaScript.
Shoppers with a cart
By default, a shopper with something in their cart gets freshly built pages. Cache pages for shoppers with a cart (off by default, shown only when WooCommerce is active) keeps serving them cached pages instead, with one copy per cart so the mini-cart stays right. Leave it off if your pages show anything else personal, such as prices by location.
Prices by location (WooCommerce geolocation)
WooCommerce’s Default customer location setting (WooCommerce › Settings › General) decides whether prices and taxes depend on where the visitor is:
- Shop base address or No location by default: every visitor sees the same prices. This is the right choice for page caching if your prices don’t vary by country.
- Geolocate: don’t use this with any page cache. The first visitor’s prices get stored and shown to everyone.
- Geolocate (with page caching support): WooCommerce adds a
?v=code to each address to keep countries apart. Today xSpeed doesn’t cache those addresses, so the store is served uncached. Use this only if you really need location-based prices, and expect less from the page cache until xSpeed supports it.
On xCloud, and on OpenLiteSpeed
xCloud installs and configures xSpeed Cache on new WordPress sites. Keep xCloud’s own Full Page Caching and Redis Object Caching off: xSpeed already provides both, and running two of each conflicts. Turning off xCloud’s Redis Object Caching doesn’t stop the Redis server: it keeps running, and xSpeed’s Object Cache connects to it, so your site still has an object cache. On an Nginx server, click Re-sync Nginx Configuration on the site’s Caching page in xCloud after you change xSpeed’s exclusions, so the server rules match. xCloud’s guide to configuring xSpeed Cache on xCloud covers the dashboard side.
OpenLiteSpeed and LiteSpeed use the same values. Two things differ:
- xSpeed manages its own server rules there, so there’s nothing to re-sync.
- Cached pages go through xSpeed’s PHP layer by default, so the mobile-cache cost above doesn’t apply unless you’ve turned on LiteSpeed Static Fast Path.
On any other Nginx host, add the server snippet once, as the setup wizard explains. Without it, cached pages are served through PHP and are several times slower.
With xSpeed Pro
- Critical CSS and Load CSS without blocking, together, remove render-blocking CSS from the top of the page.
- Remove Unused CSS trims the large stylesheets WooCommerce themes load on every page.
- One-click profiles (Tools › Migration) include a WooCommerce profile. It applies a 24-hour expiry, the store exclusions, Minify HTML and CSS (JavaScript left off) and image lazy-loading in one step. Add the Defer/Delay exclusions and the main-image rule from this page afterwards. See How to import settings and profiles.
Test after every change
On a blog, open the home page, one post and the menu on a phone, and check nothing moved or disappeared.
On a store, run through a whole purchase in a private window, with your payment gateway in test mode:
- Open the shop and a product page. Check the main image appears straight away.
- On a variable product, pick a size or colour and check the price and image update.
- Add to cart, and check the header mini-cart count changes.
- Open the cart and change a quantity. Apply a coupon if you use them.
- Go to checkout. Check every payment button you offer appears (card, PayPal, Apple Pay or Google Pay) and that reCAPTCHA or Turnstile shows if you use it.
- Place the order. Check the thank-you page and the order email.
- Log in to My account and check the order is listed.
- Open the home page again in the same window. With something in your cart, the mini-cart should still show it.
If any step fails, turn the last setting you changed back off, and check its exclusions.