Technical Configurations

Technical guides, info, and code examples.

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, when the Preload feature is enabled, the rocket_clean_domain() function will also trigger preloading. If you want to…

rocket_clean_files()

Use the rocket_clean_files() function when you want to purge some specific pages of the cache. You can use a string, or an array with the URL(s) to purge. // clean http://your-site.com/contact/ rocket_clean_files( 'http://your-site.com/contact/' ); // clean http://your-site.com/contact and http://your-site.com/legal/ $clear_urls…

rocket_clean_home()

Use the rocket_clean_home() function when you want to purge your home page from the cache. If your website is multilingual, you can specify the language to purge. // clean the home rocket_clean_home(); // clean the French home page rocket_clean_home( 'fr'…

rocket_clean_post()

Use the rocket_clean_post() function when you want to purge a post and all ā€œelementsā€ associated to it from the cache. Associated elements would be category and tag archive, archives with pagination, etc. //clean post with ID 5 rocket_clean_post( 5 );

rocket_clean_user()

The rocket_clean_user($user_id, $lang) function can be used to clear the cache of a specific user when you have logged-in user cache option active. The function takes two parameters: $user_id The user ID. $lang The language code (optional) It's not possible…

Site Health Check

This article contains information about common WordPress Site Health checks, how WP Rocket can help, and how it's related to some of them.WP_CACHE is set to false The WP_CACHE is a WordPress native constant that enables or disables WordPress caching.…

Using SSL with WP Rocket

If use SSL on your website, make sure to take the following steps to ensure that it works correctly with WP Rocket. Note: We provide this info as a helpful, informational guide for you; we don’t provide support for the…