How is the Cache Preloaded?

WP Rocket comes with two great features : automatic and on-demand cache preload. These two features ensure that your pages are always cached. So your visitors or search engines bots won't have to generate the cache for the best user experience :)

We use dedicated crawlers hosted on our servers to preload your cache for a lower CPU footprint on your server, better compatibility, and the fastest crawl. The whole process is totally transparent to you. 
The crawlers don't collect any information, they only simulate a visit to create the cache files.

On Demand Preload

This is the first way to preload your cache. Click on the button " Preload Cache". Our bot will crawl your homepage and all the links found on your home.

Sitemap preloading

Since WP Rocket 2.8, there is also the possibility to preload your content using an XML sitemap. The advantage of this feature is that it will preload all the URLs in your sitemap file(s), and not only the homepage and the links found on it!

The sitemap feature is also not dependant on our bot, so if you had any trouble with too much load on your website and had to disable the preload bot, it will enable you to still benefit from the preloading.

The sitemap preloading can be launched from the admin bar menu or the Preload tab of WP Rocket. It will also automatically run when the lifespan of the Clear Cache Lifespan option expires.

Currently, the sitemaps generated from Yoast SEO, All in One SEO and Jetpack are automatically detected!

Automatic Preload

When you write or update a new post/page, WP Rocket automatically clears the cache for this content and any other content related to it, (i.e. home, category, tag, pagination etc) and our bot will crawl these pages again to generate the cache.

Note: If you are using the "Clear Cache Lifespan" option to purge the cache on a regular basis, our bots will automatically rebuild the cache then as well.

If you want to make sure that this happens at a certain time every day, you can  create a cron job (through your webhosting control panel) and launch this function at whatever time you want:

You can check detailed instructions in separate post here.

To do this, you have to create PHP file and name it what ever you want, for example rocket-clean-domain.php. Paste the following code inside:

require( 'wp-load.php' );
if ( function_exists( 'rocket_clean_domain' ) ) {

Place this file in WordPress installation's root (where wp-config.php and wp-load.php are located).

Note: If you place it on some other place, you need to edit path to wp-load.php in above's code  require( 'wp-load.php' ); to match its location.

Make sure to specify correct path to  rocket-clean-domain.php file in Cron Job settings.