How is the cache preloaded?

Overview of preloading

When you enable “Activate Preloading”:

Your homepage and all the links found on it will be preloaded as follows: 

  • When you save changes to the WP Rocket settings (because the cache is cleared)
  • When the Cache Lifespan expires
  • When you click the Preload link from the admin toolbar, or on the WP Rocket dashboard

Updated content is preloaded

Additionally, when you publish or update posts/pages/custom post types, WP Rocket automatically clears the cache for that specific content and any other content related to it (i.e. home, category, tag, pagination etc.). This content and the related pages will be preloaded automatically.

Plugin activation

When you install WP Rocket for the first time, “Activate Preloading” is enabled by default and your homepage and links found on it will be preloaded immediately after activating the plugin, to ensure your site is fast right away.

Manual Cache Clear

When you manually clear the cache (from the admin toolbar or WP Rocket dashboard), only your homepage will be automatically preloaded. For a full preload, you must manually initiate that (from the admin toolbar or WP Rocket dashboard).

When you enable “sitemap-based cache preloading”:

Sitemaps generated by Yoast SEO, All-in-one-SEO, Rank Math SEO, SEOPress or The SEO Framework are detected and you can check the box to automatically use them. 

If you don’t use one of those plugins, or want to specify sitemaps for preloading, enter the URLs in the "Sitemaps for preloading" text field.

These URLs will be preloaded after the homepage URLs are preloaded, according to the same triggers: 

  • When you change the WP Rocket settings (because the cache is cleared)
  • When the Cache Lifespan expires
  • When you click the Preload link from the admin toolbar, or on the WP Rocket dashboard

There is no duplication since any URL that already has a cache file will be skipped over. 

Please note: Preload doesn't work for user cache or cookie-specific cache files.
To preload the separate mobile cache files instead of standard desktop ones, please follow this guide

Preloading when WebP Compatibility is enabled

If you have enabled the WebP Compatibility option on the Media tab, WP Rocket will preload the WebP cache file instead of the non-WebP cache file.

Technical info

  • The preload uses a background process which will never consume more than 90% of the available PHP memory. Therefore you shouldn’t encounter any high CPU issues.
  • Sitemap preloading requires that the SimpleXML PHP extension is enabled on your server.


If you have any problems with preloading not working, please read this guide.

Stopping the preload

After a preload has been triggered, a notice will be displayed at the top of your screen. It contains a “stop preload” button if you want to halt the process:

Preload crawl interval

WP Rocket’s default interval for crawling URLs to be preloaded is 500 ms. That’s the time it will wait before moving from one URL to the next.

If you need to change the crawl interval in version 3 and above, there’s a little extra plugin you can use for that purpose:

đź“Ą  Download (.zip):  WP Rocket | Custom Preload Intervals
Developers: You can find the code for this plugin on GitHub.

Heads up! Remember to edit the value for the WPROCKETHELPERS_PRELOAD_INTERVAL_IN_SECONDS constant; the default is 5 seconds.

Preloading at a specific time

If you want to make sure that a preload happens at a certain time every day, you can create a custom cron job through your webhosting control panel and launch one of these function at whatever time you want:

  • To trigger homepage-based preloading: run_rocket_bot()
  • To trigger sitemap-based preloading: run_rocket_sitemap_preload()

For further instructions, follow this guide on clearing the cache via cron job. Remember to change the function names to the ones above!

Prefetch DNS requests

If you have third-party content on your website (e.g fonts loaded from Google, or a video from YouTube), you may want to add its origin domain to the  Prefetch DNS Requests option. This can give your loading time a minor boost, since DNS resolution will already have been processed when the external resources get requested.

Add the origin host with relative protocol (double slash, no http:) like so:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.