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).
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” (see note, below). 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.
For sites without page caching, Blackhole works perfectly and can help improve SEO by stopping bad bots and spam.
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. What we know so far:
WP Super Cache
- Required setting: Advanced tab ▸ “Late init” enabled
- Also empty/clear the cache before going live
WP Fastest Cache
- Banhammer (free and pro) are not yet compatible with this cache plugin
- Blackhole (free and pro) require the free Blackhole Cache Helper
- Empty/reset the cache before going live
WP Rocket
- Required to disable page caching
- Empty/reset the cache before going live
Note: there is a submitted request for WP Rocket to add a “Late Init” feature. WP Rocket users please up-vote to help get this implemented, thank you. Update: Looks like WP Rocket declined/removed the request to add the new late init feature, so link removed.
SG Siteground SuperCacher
For newer versions of Siteground Optimizer cache plugin:
- Disable “Dynamic Caching” (i.e., full page caching) and “File-Based Caching”
- Empty/reset the cache before going live
So basically, currently only the “Object Caching” feature works with Blackhole.
W3 Total Cache
- Required setting: Page Cache ▸ Advanced ▸ “Late initialization” enabled
- Visit the W3 Dashboard and empty/reset all caches before going live
FlyingPress
- Required: disable “Cache Pages” setting
- Purge Cached Pages
WP LiteSpeed Cache
Unverified at this point, but reports are telling us that Blackhole and WP LiteSpeed Cache work great together. Other reports are saying that it does not work with LiteSpeed. If you have any results or data, please let us know.
Webcraftic Clearfy
Initial reports telling us this cache plugin is working with Blackhole/Pro. If you have any related infos, please let us know.
Powered Cache
Reports indicate that the Blackhole Cache Helper works with Powered Cache plugin. So with Cache Helper active, Blackhole is compatible with Powered Cache. If you have any results or data, please let us know.
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. What we know so far:
- Cloudflare WordPress plugin
- Cache Enabler
- Comet Cache
- Simple Cache
- Hyper Cache
- EasyWP
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!
Blackhole Cache Helper
The Cache Helper is a very simple and free plugin that enables Blackhole (both free and pro versions) to work properly. The Cache Helper is known to work with the following plugins. If you have results regarding any other plugin, please let us know.
- WP Fastest Cache
- Powered Cache
Installation and Usage:
- Download the Cache Helper
- Unzip and upload to
/wp-content/mu-plugins/
directory - Done!
Once installed, the Cache Helper will enable Blackhole to work with plugins like WP Fastest Cache. How does it work? Blackhole link uses dynamic nonce parameter in the hidden trigger link. So if/when all site pages are cached, the trigger link won’t work, because the nonce value will not be current. The Cache Helper plugin fixes this for some caching plugins.
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, check out these resources:
- How to Verify that Blackhole is Working Properly
- Blackhole Pro readme.txt (under “Testing” section)
- Blackhole Pro – Whitelist Plugins
- Blackhole Pro – Whitelist Bots
- Blackhole Pro – Block Specific User Agents
Please report any issues or findings via the contact form. Thank you!