Using Wordfence with WP Rocket
Although WP Rocket is compatible with the Wordfence plugin, there are a few things that can cause trouble.
Firewall blocks Remove Unused CSS feature
Wordfence firewall can block our tool and cause 403 errors when Remove Unused CSS process is running.
To improve compatibility, WP Rocket automatically adds our server's IP (141.94.254.72) to the Wordfence allowlist:
If you still have issues, please proceed with the following steps:
- Go to Wordfence > Firewall > Basic Firewall Options
- Select Learning mode as in the screenshot
- Save settings.
- Enable Remove Unused CSS feature in WP Rocket and wait until the process is completed.
- Change back the Wordfence settings from Learning Mode to Enabled and Protecting.
Live Traffic
This option can be useful in some cases, but it will slow down your website. Unfortunately, WP Rocket as well as any other caching plugin cannot control this, so we highly recommend not to use this functionality of WordFence.
If you are not sure where to find these options inside WordFence, check out this short video.
Firewall blocks installing WP Rocket
Some customers may encounter the error message: “A potentially unsafe operation has been detected” when trying to install or activate WP Rocket.
This issue is not exclusive to WP Rocket. The error occurs due to Wordfence’s security settings, which might mistakenly flag WP Rocket’s installation or certain actions as a false positive.
To resolve this issue, you can temporarily enable Learning Mode in Wordfence as described above. This will allow Wordfence to recognize legitimate actions during the WP Rocket installation process.
For additional guidance on Learning Mode, you can refer to Wordfence’s official documentation: Wordfence Learning Mode Guide