Warm the caches after a deploy
This task is for administrators after a deploy or a full cache clear. At the end the main pages are rendered and cached before visitors ask for them. Reference: Preloading caches.
Contents
Before you start
- The deploy is complete, including the PHP-FPM reload or Velocity restart; warming before that caches old pages.
- Shell access, or
setup/preloadfor the Preload Sites view.
Steps
Pick one:
Section pages first, then links (one run at a time; every run is listed on Setup > Preload Sites):
php bin/php/preload.php --apply --siteaccess=site --allow-root-userEvery published page, suitable for a cron entry:
php bin/php/warm.php --allow-root-user >> var/log/cache-warm.log 2>&1In the browser: Setup > Preload Sites (
/setup/preload), choose the site, a page limit (default 250) and a link depth (default 3), and watch the pages being fetched.
With Velocity, exp:velocity deploy already requests the addresses of [DeploySettings] WarmUpURL[] in its last
step; add your most visited pages there.
Check it worked
curl -s -o /dev/null -w '%{time_total}s\n' https://www.example.gov/Run it a few times: after warming, the time is the cached time from the first request. Use your own site's public
siteaccess name for --siteaccess.
Related pages
- Deploy a PHP change
- Cache warming after changes
- Preload Sites view
- Cache clearing and warming (hosting)
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.