Configuring the Cache Preloader
The cache preloader warms your page cache ahead of time, so visitors land on a cache HIT instead of waiting for a cold page to build. This guide explains what it does and how to set it up.
What this does
When a page is not yet cached, the first visitor has to wait while WordPress builds it. That first request is a cache MISS, and it is slower than a cached page.
The preloader avoids that wait. It reads your sitemap, then visits each page itself in the background. Each visit writes a cached copy, so the next real visitor gets a fast HIT.
By default the preloader uses the WordPress core sitemap at /wp-sitemap.xml. It follows nested sitemap indexes and skips any URLs you have excluded from caching in the Cache settings.
Why use it
- Visitors rarely hit a cold, uncached page.
- New posts and pages are cached before anyone opens them.
- Cache is rebuilt on a schedule, so it stays warm even after it expires.
How to set it up
- Go to the xSpeed Cache dashboard in your WordPress admin.
- Open the Preloader panel.
- Turn on Enable Preloader.
- Choose a Schedule for how often a fresh crawl runs.
- Adjust Batch Size if you want the crawl to go faster or easier on your server.
- Leave Sitemap URL blank to use the default sitemap, or enter your own.
- Save your settings.
Note: You must enable the preloader before you can start a crawl. If the preloader is off, the Start control returns an error asking you to enable it first.
Settings explained
| Setting | What it does | Default |
|---|---|---|
| Enable Preloader | Turns the preloader on. When on, xSpeed Cache crawls the sitemap on the schedule below and warms the page cache. | Off |
| Schedule | How often to start a fresh crawl. | Manual |
| Batch Size | How many URLs are warmed per cron tick. | 5 |
| Sitemap URL (optional) | Override the auto-detected WordPress sitemap. | Empty (uses /wp-sitemap.xml) |
| Warm new content immediately | Fetch a post or page once right after it is published. | On |
| Re-warm after comments | Fetch a page again after a comment is posted. | Off |
Enable Preloader
Turns the whole feature on or off. When off, no scheduled crawls run and the Start control is disabled. Default is off.
Schedule
Sets how often a fresh crawl begins. The options are:
- Manual — no automatic crawl. You start a crawl yourself from the dashboard.
- Hourly
- Daily
- Weekly
Default is Manual. Pick a schedule that matches how often your content changes. If you publish often, Daily or Hourly keeps the cache fresh. If your site rarely changes, Weekly or Manual is enough.
Batch Size
Sets how many URLs the preloader warms on each cron tick. The allowed range is 1 to 50, and the default is 5.
A higher number crawls faster but puts more load on your server, because more pages are built at once. A lower number is gentler but takes longer to finish a full crawl. Start with the default and raise it only if your server handles it well.
Sitemap URL (optional)
Lets you point the preloader at a specific sitemap instead of the default. Leave it blank to use the auto-detected WordPress core sitemap at /wp-sitemap.xml. Default is empty.
Set this if your sitemap lives at a custom address, for example one created by an SEO plugin.
Warm new content immediately
When on, publishing a post or page fetches that page once right away. This means the first visitor after you publish gets a HIT instead of a cold MISS. Default is on.
This only applies to public content. Private post types are not warmed.
Re-warm after comments
When a comment is posted, the page is purged from cache. With this setting on, xSpeed Cache fetches the page again so it is back in cache before the next visitor lands. Default is off.
Only approved comments trigger a re-warm. Pending and spam comments do not.
Start, Stop, and Status
The Preloader panel pairs the settings above with controls to run and watch a crawl:
- Start begins a fresh crawl now. It reads the sitemap, builds a queue of URLs, and warms them in the background a batch at a time. The preloader must be enabled first.
- Stop cancels a crawl that is in progress. It clears the remaining queue. Stop is safe to use even if no crawl is running.
- Status shows the live state of the current crawl: whether it is running, how many URLs have been processed out of the total, the last URL visited, and any errors.
Tip: Use Manual schedule with the Start button when you want full control over when crawls run, for example right after a large content import.
Best practices
- After turning the preloader on, run Start once so the cache is warm right away.
- Keep Warm new content immediately on so freshly published pages are never cold.
- If your server feels slow during a crawl, lower the Batch Size.
- Match the Schedule to how often your content changes, rather than crawling more than you need to.
Troubleshooting
- The crawl will not start. Make sure Enable Preloader is on. The Start control returns an error if the preloader is disabled.
- Status shows errors. The Status readout keeps the most recent errors, each with the URL and the reason (for example an HTTP error code). Open the listed URL in your browser to see what is wrong with that page.
- No URLs are queued. Check that your sitemap is reachable. If you set a custom Sitemap URL, confirm the address is correct. Pages you have excluded from caching are filtered out of the queue.
FAQ
Does the preloader crawl pages I excluded from cache? No. URLs that match your cache exclusions are removed from the crawl queue.
Which sitemap is used by default?
The WordPress core sitemap at /wp-sitemap.xml. You can override it with the Sitemap URL setting.
What does Manual schedule mean? No automatic crawls run. You start each crawl yourself with the Start control.
Related
- How to Enable Page Cache
- Setting Cache Lifetime (TTL)
- Excluding Pages, URLs, and Cookies from Cache
- Browser Cache Settings