Preload Cache is not Working

If you think that the preload cache feature is not working on your site, first check to see whether or not cache files are being generated after you click the Preload button.

How To Check if Cache Files are Created

Using either the File Manager in your cPanel, or an FTP client, navigate to the following folder:

wp-content/cache/wp-rocket

Within the wp-rocket folder you should then see a sub-folder named after your domain, e.g.:  example.com

Inside that folder you will see any existing cache files.

Now click the Preload Cache link in the WP Rocket admin toolbar menu. Wait a few moments then refresh the cache folder in your file manager. You should see new files added, or existing files updated. You can check the date to see when they were updated.

Remember that the preload bot visits your homepage and the pages linked from it. So if you have pages that are not linked from the homepage, they will not be preloaded.

Troubleshooting the Preload Bot

If cache files are not being generated when you request the preload, you can take the following steps.

1

Check your robots.txt File


WordPress generates a “virtual” robots.txt file you will not see in your File Manager, but it can be viewed in your browser when you go to: http://your-domain.com/robots.txt (replacing “your-domain.com” with your domain, of course).

If you see the following lines in that file, all bots, including our preload bot, are blocked from accessing your site:

User-agent: *
Disallow: /
	

In that case you would need to make your site accessible for bots by unchecking the Search Engine Visibility option in your Reading Settings:

If you use a custom robots.txt file, you can specifically allow our bot even when disallowing others by using this snippet:

User-agent: wprocketbot
Allow: /
	

For more info on robots files, visit: http://tools.seobook.com/robots-txt/

2

Check your Website Access Logs

By checking your website access logs you can see if the bot is attempting to visit your site. Locating the logs will vary from host to host. You may find them via FTP or in your cPanel. If you are not sure about this, contact your webhost directly. Here are directions for some common hosts:

The access log can be opened in a text editor such as Sublime Text (Windows and Mac) or Notepad++ (Windows). On a Mac you can also use the application Terminal (pre-installed).

After you have opened the log, do a search for: wprocketbot
The results will look like this:

In this example,which shows the preload bot working correctly, in red you will see GET and the url of the page visited, followed by the status code, underlined in green. Status code 200 means that the bot was successfully able to visit the page.

3

Whitelist our Preload Bot

You can try whitelisting these IP addresses that our bot uses:

167.114.255.163
167.114.238.112
167.114.236.135
167.114.234.234
	
4

Check Server Response Time

Our bot has a timeout of 2 seconds. This means that it will wait 2 seconds for your server to respond, and if it doesn't respond, the bot leaves and no preloading will take place.

To check the response time of your server, you can do it with a cURL command (using something like Terminal for Mac, or cmd.exe for Windows). Enter the following command, and don't forget to replace example.com with your own domain name: 

curl -o /dev/null -s -w %{time_total}\\n  http://example.com
	

Common Errors

In the below example the bot has not been able to access the site. Code 301 means there is a redirect in place which prevents the bot visiting the site. Code 404 means a page is missing and cannot be found, again, preventing the bot accessing the site.

In most cases, any status code besides 200 will indicate an issue that you must resolve on your site before the bot will be able to successfully access your site.

If you encounter an error code of 500 or above, or another kind of non-specific server error code, on a regular basis this could mean that your server cannot handle the frequency of the bot's visit, so the solution may be to increase your server CPU and/or PHP memory limit. This can happen in particular when your home page has a lot of links on it. In these cases you can contact us to disable the bot for your site.

You can check the meaning of a specific status code here: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

If you are using a maintenance mode plugin, or a splash page plugin—anything that prevents a visitor seeing your site—this will also block our bot.

If you search your access log and you do not see any entries for our bot, then in this case, it may indicate a problem on our end and you can submit a support ticket.

When submitting a support ticket regarding bot issues, including your log file will be very helpful for us.