Troubleshooting & Compatibility
14 results
Broken layouts, errors, and unexpected behavior.
502 or 504 error when manually clearing the cache
If you see a 502 error from Cloudflare or 504 Gateway Time-out from NGINX when clearing the WP Rocket cache, please check if you are also using the Query Monitor plugin. In some cases, this combination can lead to the 502/504 error. …
Can I exclude a shortcode from the cache?
It's not possible to exclude the output of a shortcode from being cached. That would require fragment caching which WP Rocket doesn't support. Page caching caches the entire output of the page. If your shortcode requires PHP to update its…
Error: It seems that the advanced-cache.php file is not ours
If you're seeing this error message in your WP admin: you should check the following in order to resolve it. 1) Check that your advanced-cache.php file contains the correct define mode: define( 'WP_ROCKET_ADVANCED_CACHE', true ); 2) If the define mode is…
Logged-out cache displayed to logged-in users
If you have a site where users log in to view content, there can be cases where the logged-out page is shown to logged-in users, or vice versa. Please check the following: Are you using an additional cache layer such…
ManageWP: how to clear and preload WP Rocket cache
You can clear and preload WP Rocket cache from your ManageWP control panel. To do it, you can use the following snippet. <?php // ManageWP PHP Snippet, will clear the cache and trigger a preload. // related doc: https://docs.wp-rocket.me/article/1320-managewp-how-to-clear-wp-rocket-cache // Load…
Pages are not cached or optimizations are not working
By default, WP Rocket delivers cached and optimized pages for visitors, unless you’re visiting: Pages as a logged-in user, in which case you should enable User Cache, log out of WordPress or visit the site using an incognito window. Pages with…
Redis and object caching
Redis is used to perform object caching. This is a different type of caching than the page caching provided by WP Rocket. So it's completely possible to use Redis, or another type of object caching at the same time as…
Site Health error: WP_CACHE is set to false
Sometimes in the Site Health tool you may see this message: WP_CACHE is set to false. The WP_CACHE constant needs to be set to true for WP Rocket cache to work properly This message is a false positive if you…
Subpages are not cached
If the $_GET super global variable is customized for some reason, this might result in WP Rocket not caching and optimizing pages. This can happen in some server environments, like NGINX (if customized), Plesk Onyx and IIS. The main symptom…