To protect your site against bad bots, Blackhole needs to check each request. It does this using the WordPress
init hook. When running a plugin that caches pages, the
init hook may not be executed. So depending on the cache plugin, Blackhole may be unable to check the request. This post provides updated information regarding which caching plugins work best with Blackhole (free and pro version).
Note: The information in this post applies to both free and pro versions of Blackhole!
Types of cache plugins
There are many types of cache plugins. They provide all sorts of different caching mechanisms and features. All caching features work great with Blackhole except for “page caching”. With page caching, the required
init hook may not be fired, which means that plugins like Blackhole for Bad Bots are not able to check the request to see if it should be blocked. Fortunately, two of the most popular caching plugins provide settings that enable full compatibility with Blackhole.
Compatible Cache Plugins
Here is a list of the cache plugins that work great with Blackhole for Bad Bots and Blackhole Pro. If any plugin has specific requirements, they will be listed. The following plugins are fully compatible with both free and pro versions of Blackhole.
WP Super Cache
- Required setting: Advanced tab > “Late init”
- Also empty/clear the cache before going live
W3 Total Cache
- Required setting: General > “Disk: Basic”
- Required setting: Page Cache > “Late initialization”
- Empty/reset the cache before going live
SG Siteground SuperCacher
- No special requirements.
Other Cache Plugins
We haven’t tested every WordPress caching plugin, so there may be others that also are fully compatible with Blackhole. If you know of any that may work, please contact us so we can test thoroughly and then add them to the list :)
Incompatible Cache Plugins
At the time of this writing, the following cache plugins are not compatible with Blackhole (both free and pro versions). This may change in the future, as developers add more features (like the “late init” option). But for now the following plugins lack the required functionality.
- WP Fastest Cache
- WP Rocket
- Cache Enabler
- Comet Cache
- Simple Cache
- Hyper Cache
If you know of any new features for these plugins that may enable compatibility with Blackhole, or if you know how to use existing features to enable compatibility, please contact us. Thank you!
Testing & Troubleshooting
In our quest to make Blackhole fully compatible with all caching plugins, proxies, load balancers, and so forth, here are some things to try when testing and troubleshooting.
- Add the blackhole trigger URL (available via the “Robots Rules” setting) to your caching plugin’s “ignore” or “exclude” setting. This is useful if your cache plugin is caching the Blackhole “warning” page.
- Add the IP(s) of your caching service, proxy service, load balancer, etc. to the Blackhole setting, “Whitelisted IPs”. This is useful if you are using a third-party service to help with caching.
Remember to always test new plugins and services thoroughly. For more information on testing and troubleshooting, refer to the “Testing” section in the Blackhole Pro readme.txt.
Please report any issues or findings via the contact form. Thank you!