WordPress

WooCommerce Add to Cart or Checkout Slow? Caching, Redis and the WP Rocket Settings That Fix It

Why add to cart and checkout are slow when product pages are fast, what a store must never cache, the WP Rocket settings that matter and when Redis helps.

WooCommerce Add to Cart or Checkout Slow? Caching, Redis and the WP Rocket Settings That Fix It
On this page 8 sections
  1. The layers of caching
  2. What a store must not cache
  3. WP Rocket settings for a WooCommerce store
  4. Object cache: when Redis helps
  5. Why add to cart is slow
  6. Why the checkout is slow
  7. Common problems and fixes
  8. FAQ

When add to cart or the checkout is slow in WooCommerce while product pages load fast, the cause is nearly always the same: those requests cannot come from the page cache, so every one is built from scratch by PHP and the database. The fixes are an object cache such as Redis, less work on those requests, and a page cache that is set up correctly for a store: every public page cached, and the cart, the checkout and the account pages never.

This guide explains the layers of caching, what a store must leave out, the WP Rocket settings that matter for WooCommerce, when Redis helps, and why add to cart and the checkout get slow.

We build WooCommerce themes at 8theme. Cache is mentioned in about 13,800 of the 45,000+ topics in our support forum (counted in November 2026). That is nearly one topic in three, usually as the first thing to try: clear the cache. WP Rocket alone comes up in about 930 topics, and it is the caching plugin we run on 8theme.com.

The layers of caching

Layer What it stores Good for
Browser cache Images, CSS and scripts on the visitor’s device Repeat visits
Page cache The finished HTML of a page, on the server Home, category, product and blog pages
Object cache (Redis, Memcached) Results of database queries, in memory Cart, checkout, account, admin, large catalogs
CDN Static files, close to the visitor Visitors far from your server

A page cache makes the biggest difference for visitors who browse. An object cache helps exactly where the page cache has to stay off.

What a store must not cache

  • Cart, checkout and account pages. They are different for every visitor.
  • The wishlist and compare pages, for the same reason.
  • Pages for visitors with something in the cart. WooCommerce sets cookies when a product is added, and a good caching setup skips the page cache for those visitors.
  • Anything behind a login, unless you have a separate cache per user and a reason to use it.

WP Rocket and the other well-known caching plugins exclude the WooCommerce cart, checkout and account pages by themselves. Server-level caches, such as Nginx FastCGI, Varnish or a full-page cache at the CDN, do not: there the exclusions have to be set by hand. Most “another customer’s cart” reports come from that.

WP Rocket settings for a WooCommerce store

WP Rocket caches pages as soon as it is activated. These are the settings worth a decision.

  • Mobile cache. Turn on the separate cache for mobile devices if your theme sends different markup to phones. With XStore, either enable it or switch off Mobile header optimization under Theme Options → General; the XStore documentation explains the pair.
  • User cache. Leave it off for a normal store. It is for sites where logged-in members see pages that can be cached per user.
  • Minify and combine files. Test after each switch. If the layout breaks, exclude the file that broke it.
  • Delay JavaScript. It helps the speed scores most and breaks the most. Check the product gallery, variation swatches, the mini cart and the checkout, and exclude the scripts they need.
  • Remove unused CSS. Check a product page with variations, the cart drawer and the menu on a phone before you keep it.
  • LazyLoad. Use it for images below the first screen, not for the main product image.
  • Preload. Keep it on, so pages are already in the cache when a visitor arrives.
  • Database cleanup. Clearing expired transients is safe. Think twice before deleting post revisions.

Do not solve one job twice. If the theme, the host and a plugin all minify files or lazy-load images, switch the feature on in one place only.

Object cache: when Redis helps

A page cache cannot help the cart or the checkout, because those pages are built for each visitor. Every such request runs hundreds of database queries. An object cache keeps the answers in memory, so the next request does not ask the database again.

Redis is worth setting up when:

  • add to cart, the cart or the checkout are slow while product pages are fast,
  • the admin is slow, especially orders and products,
  • the catalog is large or the store has many logged-in customers.

It needs Redis on the server, which the host provides, and a plugin such as Redis Object Cache to connect WordPress to it. Give every site on the server its own key prefix, and flush the object cache after large imports.

Why add to cart is slow

Add to cart is never served from the page cache, so it shows the store’s real speed.

  1. Test without the cache in the way: add a product while logged out, in a private window, and time it.
  2. Add an object cache. It is the single biggest fix for this request.
  3. Look at what runs on add to cart. Dynamic pricing rules, shipping calculations, stock checks against an outside system and tracking scripts all add time.
  4. Check the cart fragments request. The mini cart is refreshed by a background request. Recent WooCommerce versions load it only where a mini cart is on the page; old code and some plugins still call it on every page.
  5. Check the server. A current PHP version and enough PHP workers matter more here than any plugin.

Our WooCommerce speed guide covers the rest of the page.

Why the checkout is slow

The checkout does more work than any other page, and most of it repeats.

  • Every change of a field recalculates the order. Country, postcode and shipping method each trigger a background request that works out shipping and tax again.
  • Live shipping rates. If rates come from a carrier’s server, each recalculation waits for that server. Cache the rates or use table rates.
  • Too many payment methods. Each gateway loads its own scripts. Two methods are usually enough.
  • Work done at the moment of the order. Emails, stock updates, invoices and syncs with accounting or a CRM all run before the thank-you page shows. Tools that queue this work in the background keep the button fast.
  • Checkout add-ons. Field editors, address lookups and fraud checks each add a request.

An object cache helps with the first point. The others are about doing less on that page.

Common problems and fixes

Problem Cause Fix
A customer sees another customer’s cart or name The cart, checkout or account page is cached, usually by a server or CDN cache Exclude those pages and bypass the cache for visitors with WooCommerce cookies
The mini cart shows the wrong count A cached page and a blocked or delayed fragments request Exclude the cart scripts from delay and defer settings
A price or stock change does not show The old page is still in the cache Clear the cache for that product; check that the cache is cleared when a product is saved
The layout breaks after turning on an optimization A file that must load early was minified, combined, delayed or removed Exclude that file, or turn the option off
Changes in the theme options do not show Several caches in a row Clear them in order: plugin, server, CDN, then the browser

FAQ

Should I cache the WooCommerce checkout?

No. The cart, the checkout and the account pages must never come from a page cache. Speed them up with an object cache and a faster server.

Is WP Rocket good for WooCommerce?

Yes. It leaves the cart, checkout and account pages out of the cache by itself and skips the cache for visitors with items in the cart. Test the file optimization settings before you keep them.

Do I need Redis for a small store?

Usually not. Page caching is enough while the cart and checkout feel fast. Add an object cache when they slow down or the admin drags.

How often should I clear the cache?

Only after a change that visitors should see at once: a design change, a price change that did not show, an update. Clearing it on a schedule only makes the next visitors wait.

Does XStore work with WP Rocket?

Yes. XStore by 8theme works with WP Rocket and other caching plugins, and 8theme.com itself runs on WP Rocket. The one setting to check is the separate mobile cache.

Why is my store fast in tests but slow at add to cart?

Speed tests measure cached pages. Add to cart, the cart and the checkout are built fresh for each visitor, so they depend on the database, the object cache and the server.

Share

Written by

Alex Carter

Alex writes practical WordPress and WooCommerce guides for the 8theme blog.

All 22 articles by Alex Carter