WordPress / WooCommerce Caching Setup
WordPress and WooCommerce caching setup
Caching is the cheapest way to speed up WordPress. It is also the most frequent source of strange bugs when configured without regard for the store.
What I configure
- Page caching with correct exclusions for dynamic sections;
- object caching — database queries stop repeating on every page load;
- browser caching and correct headers for static assets;
- delivery optimization: compression, modern image formats, lazy loading;
- alignment with a CDN, where one is in use;
- cache invalidation when a product or price changes.
WooCommerce specifics
The cart, checkout, account area and "My orders" page are never cached. Cache them and shoppers start seeing each other's carts — that is not a hypothetical risk but a common bug in stores with aggressive cache settings.
The second subtlety is cart fragments. WooCommerce updates the item counter with a separate request, and on a cached page it can show the wrong number. That is solvable, but it needs attention.
The typical finding
Several caching plugins at once. One was installed, it did not help, a second was added, the first was never removed. They conflict, and the site performs worse than with no caching at all.
Tags: wordpress, cache, redis, litespeed, woocommerce