rocket_clean_domain()
Use the rocket_clean_domain()
function when you want to purge a complete domain from the cache, that is: clear the cache for your entire website.
Additionally, from WP Rocket 3.12, when the Preload feature is enabled, the rocket_clean_domain()
function will also trigger preloading.
If your website is multilingual, you can specify the language to be cleared.
// clean the default domain rocket_clean_domain(); // clean the French domain only rocket_clean_domain( 'fr' );
Note: WP Rocket supports Polylang and WPML plugins for multilingual content.