Browse AjaxPress docs

Cache all pages in advance

On this page

Normally a page is cached the first time someone visits it, so that first visitor waits for your server. Cache all pages fills the cache ahead of time, in the background, so even the first visit to each page is fast.

It’s on Settings โ†’ AjaxPress โ†’ Cache, in the status panel, once Super Cache is deployed.

What happens automatically

When you first connect and deploy, AjaxPress starts filling the cache by itself: your key pages first (the home page, the blog page and your post type archives), then every published post, page and other public content. Each page is stored in the Global layer, Cloudflare’s globally replicated copy of your pages.

Cache everything again

Click Cache all pages to run the same fill at any other time: after a Purge All, after a big redesign, or when you’ve added a lot of content at once.

While it runs, the button reads Keep caching all pages, with the note “Caching pages in the background – this can take a while on a large site.” You can leave the screen, or close your browser; it carries on by itself.

How long it takes

AjaxPress caches a few pages at a time, about once a minute, and at most 900 pages a day. That limit keeps within the free Cloudflare plan’s daily allowance for the Global layer, and keeps the load on your server low.

Site sizeRoughly
Up to a few hundred pagesWithin a few hours
900 to 2,000 pagesTwo or three days
Larger sites900 pages a day until done

It relies on WordPress’s scheduled tasks (WP-Cron), which run when your site gets visits. On a very quiet site, or where WP-Cron is disabled without a real cron job to replace it, it runs slower.

Good to know

  • It only helps first visits. Pages that visitors request are cached anyway.
  • Edits still clear themselves. An updated post is purged as usual, and cached again on its next visit.
  • Excluded pages are skipped. Anything in Pages to never cache isn’t cached.

Developers

Change the daily limit with the ajaxpress_cf_warm_daily_budget filter (on a paid Cloudflare plan, for example), and the pages cached right after deploying with ajaxpress_cf_warm_seed_urls. See PHP hooks and filters.