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. 

If you are not actively using Query Monitor, you should deactivate it. 

Or, you can add this code snippet which will resolve it: 

add_action( 'before_rocket_clean_domain', function() {
    do_action( 'qm/cease' );
} );

See this article for how to safely add code snippets to your site:
Add code snippets

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

Still need help? Contact Us Contact Us