Pages Are Not Cached or CSS and JS Minification Are Not Working

If you believe that WP Rocket is not caching your pages or is not minifying your CSS and JS files, it might be that the minimum requirements for the plugin to function have not been met. Or it could be that you have previously installed other caching plugins, and even if you deleted them via the WordPress dashboard, they have left files and configuration behind.

In order to function correctly, WP Rocket needs the following:

1
WP-config.php needs to be writeable.
Make sure that the following line is present at the top of the file, after the opening <?php tag. If it is too far down in the file, it WILL NOT WORK! 
/** Enable Cache by WP Rocket */
define( 'WP_CACHE', true );
	
Make sure there is no reference to another caching plugin. For example, Super Cache leaves behind the following:
define( 'WPCACHEHOME', '/path-to-your-wordpress-install/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manage
	
2
Make sure that the  wp-content/cache folder has  writing permissions and that there are 3 folders within it: /min, /wp-rocket and /busting
All need writing permissions.

If these folders don't exist you should manually create them.

If you have previously enabled any other caching plugins, they may have left behind their own folders. 

Within the wp-content/cache folder, the only 3 folders WP Rocket creates are /min, /busting and /wp-rocket. All others should be removed. 

Super Cache also creates a wp-cache-config.php file within wp-content which should be deleted. 

W3 Total Cache creates the following within wp-content which should be deleted:

  • folder: /w3tc-config
  • files: object-cache.php, db.php

and it creates these folders within wp-content/cache which should be deleted:

  • /config
  • /db
  • /object
  • /page_enhanced
  • /minify

It may create others based on your settings.

3
Check that your .htaccess file is writeable
4
Make sure advanced-cache.php, in the wp-content folder references only WP Rocket
5
Make sure a folder named wp-rocket-config is present in wp-content. If not, create it and make sure it has writing permissions
6
If you have a multisite installation using domain mapping, try logging into your admin area using the mapped domain instead of the original domain, and then de-activate / re-activate WP Rocket. This will enable WP Rocket to detect the right domain and activate caching.
7
Sometimes another plugin may set the constant  DONOTCACHEPAGE. What this does is override all caching plugins by blocking caching from working. So this would need to be removed and the developer of that plugin informed.
Two common plugins that add a DONOTCACHEPAGE constant are s2 Member and WooCommerce Klarna Gateway.
You can see if this is what's causing the problem by installing this mini-plugin:
Force Page Caching
This will override a DONOTCACHEPAGE constant.

8
If you're  using SSL on your website, make sure to check the  SSL Cache option under Settings -> WP Rocket -> Basic Options tab.

NOTE: As of v2.7, if you're running your site under HTTPS, the SSL Cache option should be auto-activated and not removable.

9
Make sure your current theme references wp_footer(). If it is missing, adding it to the footer.php template, right before the closing </body> tag, usually resolves the issue:

After making any of these adjustments,  de-activate and re-activate WP Rocket.

Then you can verify if WP Rocket is working by following this article:
http://docs.wp-rocket.me/article/46-how-to-check-if-wp-rocket-is-caching-your-pages

Other server requirements

  • mod_expire and mod_deflate should be enabled (ask your webhost to enable these)
  • No restriction on the tmp folder
  • curl_exec function should be enabled