ManageWP: how to clear WP Rocket cache

You can clear WP Rocket cache from your  ManageWP control panel.

To do it, you can use the following snippet. 
It has to be added at ManageWP’s Code Snippet feature.

<?php
	
// Load WordPress.
require( 'wp-load.php' );
 
if ( function_exists( 'rocket_clean_domain' ) ) {
rocket_clean_domain();
}
$errors= error_get_last();
if ($errors)  {
echo "Error message: ".$errors['type'];
echo "<br />\n".$errors['message'];
} else {
echo "Cache cleared!";
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.