Sucuri Add-On
If you use the Sucuri Website Firewall with their caching enabled, you should activate the WP Rocket Sucuri add-on. This will keep the caches in sync so that your site will always be updated with your latest content. After activating the add-on, each time WP Rocket clears its cache, the Sucuri cache will also be cleared.
Activate the Sucuri Add-on
Go to the Add-Ons tab in WP Rocket, turn the toggle to On, and click Modify options.
Integrate your Sucuri API Key
Next you have to integrate the add-on with your Sucuri Firewall account. You'll need the API key from your Sucuri account. To locate that:
Login to https://waf.sucuri.net/
Click on your site and go to the API tab.
Copy the contents of the API Key (for plugin) field:
Paste that in the Firewall API key (for plugin) field in WP Rocket. The API Key should be in the format of:
32 characters / 32 characters
Finally, click Save Changes.
If your entry in the API key field is in an invalid format, you will see the following alert:
Double-check that you're copy/pasting the API Key (for plugin) from Sucuri.
Now your caches will be in sync :)
Define or Hide API key using wp-config.php
You can also define your API key in your wp-config.php file. Here is how you would add it to your wp-config.php file (remember to replace the second value in the example with your own API key):
define('WP_ROCKET_SUCURI_API_KEY', 'put-your-API-key-here');
With the following line of code in wp-config.php you can also hide the API key field in WP Rocket’s settings if you prefer to keep it secret:
define( 'WP_ROCKET_SUCURI_API_KEY_HIDDEN', true );