
A cache that is empty after a purge is not a performance feature. It is a queue of expensive PHP and database work waiting for your next visitors. This WordPress cache preload guide explains how to warm a page cache without hammering your origin server, breaking WooCommerce behavior, or mistaking preloading for a cure for slow application code.
The practical rule is simple: preload only public, cacheable URLs at a controlled rate, verify that the cache is actually being served, and exclude every session-specific or private route. Start with the pages that receive organic traffic and revenue. A full crawl of every filter, paginated archive, and search result is usually wasteful.
What cache preloading actually does
Page caching stores a finished HTML response so the web server can return it without starting WordPress, PHP, or most database queries. When a cache is purged due to a deployment, plugin update, content change, or expiration, the first request to each uncached page is a cache miss. That request pays the full cost of WordPress bootstrap, plugins, theme code, external calls, and database queries.
Cache preloading requests selected URLs after that purge. Those requests generate fresh cached HTML before real visitors arrive. The intended result is lower cold-cache TTFB and fewer visitor-facing cache misses.
Preloading does not make a slow uncached request fast. If a product page takes three seconds because of query bloat, a slow third-party API call, or exhausted PHP workers, the preloader simply causes that three-second work earlier. It can also create a short, sharp burst of CPU, PHP, and database load. That distinction matters on busy WooCommerce stores and agency sites sharing limited application capacity.
Preloading also differs from object caching. Redis or Memcached reduces repeated database work inside WordPress. Page-cache preloading creates complete HTML responses. A healthy stack can use both, but neither replaces profiling a slow template or fixing an inefficient query.
Decide which URLs are safe to preload
A preloader should fetch URLs that return the same public HTML for most anonymous visitors. For a typical content site, that includes the homepage, published posts, standard pages, category archives, and author archives if those pages are indexed and useful.
For WooCommerce, use more restraint. Public product and category pages may be cacheable, but cart, checkout, account, order-received, and customer-specific endpoints must not be preloaded or page-cached. The same applies to URLs with session identifiers, nonce-dependent actions, membership dashboards, LMS progress pages, and personalized search results.
Do not blindly feed a crawler every URL WordPress can generate. A sitemap may include attachments, outdated taxonomy archives, paginated URLs, or thin pages with no traffic value. It may also omit important landing pages. Treat the sitemap as a source list, not an instruction set.
Build a small priority set first: homepage, top landing pages, high-traffic posts, top product categories, and best-selling products. Then expand only after observing server behavior. This is safer than discovering that a 20,000-URL sitemap can consume every available PHP worker immediately after a cache purge.
Configure WordPress cache preload conservatively
Most mature page-cache systems offer either sitemap-based preloading, a crawl-on-purge feature, or both. The labels differ, but the configuration questions are the same: where URLs come from, how many requests run at once, how long the system waits between requests, and what triggers a new crawl.
Start with one concurrent request and a delay of one to three seconds between URLs. On a low-traffic site with fast uncached responses, you can increase gradually. On a store with heavy product logic, low PHP worker headroom, or frequent imports, keep the rate low. The correct setting depends on measured origin capacity, not a plugin’s default value.
A sensible preload policy looks like this:
- Use the XML sitemap or a curated URL list for public canonical pages.
- Trigger targeted warming after content updates and deployments where possible.
- Avoid a full-site preload after every minor comment, order, or inventory change.
- Exclude checkout, cart, account, search, feeds, preview URLs, and query-string variants.
- Stop or slow preloading during imports, backups, sales events, or incident response.
The last two points are where generic advice fails. A store may change product stock hundreds of times per hour. If each purge triggers a site-wide crawl, the cache system becomes a self-inflicted load test. Use granular invalidation where your caching layer supports it: purge the changed product, related category, and relevant archive rather than flushing the entire cache.
Verify cache headers before turning up the crawler
Do not assume a request warmed the cache because the preloader reports success. Inspect response headers from an anonymous request, ideally from the command line:
curl -I https://example.com/sample-page/The exact header depends on your stack, but look for an explicit cache status such as `HIT`, `MISS`, `BYPASS`, or an `Age` value that increases between requests. Make the request twice. The first may be a miss that builds the page; the second should be a hit.
If both requests are misses, find out why before increasing preload volume. Common causes include a cookie that forces a bypass, an overly broad rule that disables caching, a cache directory that is not writable, a CDN that is not connected to the origin cache as expected, or pages sending headers that prohibit storage.
Also test while logged out in a private browser window. Logged-in administrators often bypass page cache by design. Testing only from the WordPress dashboard can make a working cache look broken.
Protect PHP workers and the database
A preloader is an automated anonymous visitor. Every cache miss it creates can occupy a PHP worker. When all workers are busy, new requests queue, and TTFB rises even if CPU usage looks moderate. This is especially painful at checkout, where requests cannot be served from full-page cache.
Watch PHP-FPM active processes, queue depth, CPU utilization, MySQL slow queries, and disk I/O while a preload runs. If you do not have server metrics, use a smaller batch and observe site behavior during a quiet period. A successful preload should not cause logged-in admin pages, checkout, or uncached API requests to slow down.
If the origin is already under pressure, fix that first. Check for slow database queries, excessive autoloaded options, expensive page-builder templates, cron tasks running on visitor requests, and plugins making remote calls during page generation. More CPU helps, but it does not make an unbounded query or a blocked external request disappear.
High-frequency hardware provides useful headroom for cache generation. For example, a managed stack running dedicated AMD Ryzen 9950X resources can rebuild public pages far more quickly than an overloaded shared host. But headroom is not permission to run an uncontrolled crawler. A sensible concurrency limit still protects revenue-critical dynamic traffic.
Use deployment-aware warming instead of constant full crawls
The best time to preload is immediately after a known cache invalidation: a theme release, plugin deployment, major content publish, server migration, or intentional cache purge. The worst approach is repeatedly crawling the whole site on a timer regardless of whether anything changed.
For developer-managed sites, make warming part of the release workflow. Deploy the change, clear only the affected cache where possible, confirm that the homepage and key templates return expected headers, then warm a curated set of URLs at a safe rate. Test checkout, login, and account flows separately because they should bypass full-page cache.
A command-line workflow is often more controllable than a plugin crawler. Export or maintain a newline-delimited list of approved public URLs, then process it with rate limiting from the server or a trusted runner. Keep concurrency low until monitoring proves there is spare capacity. Do not run an aggressive multi-process command just because it finishes sooner.
If your platform uses NGINX FastCGI cache, LiteSpeed Cache, a WordPress caching plugin, or a CDN edge cache, map the layers before automating anything. You may be warming the WordPress page cache while the CDN still serves stale HTML, or warming a CDN that misses at the origin. The right target is the layer your visitors actually hit.
Common preload failures and what they mean
If preloading causes CPU spikes, lower concurrency and inspect the uncached page-generation time. A cache warmer is exposing origin cost. If it creates thousands of URLs, audit sitemap entries, canonical tags, query parameters, and faceted navigation before treating it as a server-capacity problem.
If visitors still see slow first loads after warming, confirm that the URLs match exactly. HTTP versus HTTPS, `www` versus non-`www`, trailing slash differences, mobile cache variations, language paths, and cookie-based variants can all produce separate cache keys. Canonical redirects should occur before the cache key is generated whenever possible.
If stale pages persist, do not solve the problem with shorter TTLs and more crawling. Identify the invalidation path. Product prices, stock status, menus, and editorial content need targeted purges when they change. Short TTLs increase cache churn and create more origin work, often with no improvement in freshness.
Preloading should make real visitors invisible to the rebuild process. Configure it with that standard: warm the pages that matter, measure the pressure it creates, and leave enough PHP and database capacity for the requests that cannot be cached.




