Configuring CleanTalk with Caching Plugins
Caching plugins (such as WP Rocket, LiteSpeed Cache, or FlyingPress) are essential for speed, but they can sometimes "freeze" dynamic scripts. This leads to outdated anti-spam tokens, causing false positives.
Follow this guide to ensure CleanTalk and your cache work correctly.
Go to the Anti-Spam plugin settings:
WordPress Admin Dashboard → Settings → Anti-Spam by CleanTalk.
- Set the Set Cookies option to Auto. The "Auto" mode (default setting) uses the "Off" mode and switches to the "Alternative mechanism" in case of server cache detection (e.g., Varnish, Siteground).
- Enable the Use CleanTalk JavaScript library option. This option includes external Anti-Spam by the CleanTalk JavaScript library to get visitors' info data
After applying these settings, always purge all caches
Script Exclusions
We recommend adding the following script to your caching or optimization plugin’s exclusion list (JavaScript Exclusions). Optimization plugins often minify, combine, or defer JavaScript, which can inadvertently "break" CleanTalk’s logic.
- apbct-public-bundle.min.js
- apbct-public-bundle_ext-protection.min.js
- apbct-public-bundle_ext-protection_gathering.min.js
- apbct-public-bundle_full-protection.min.js
- apbct-public-bundle_full-protection_gathering.min.js
- apbct-public-bundle_gathering.min.js
- apbct-public-bundle_int-protection.min.js
- apbct-public-bundle_int-protection_gathering.min.js
As an additional measure, we recommend setting your cache lifetime to 24 hours or less. Keeping the cache under 24 hours ensures that validation scripts are refreshed regularly.
Specific Guides for Popular Cache Solutions
If you use one of the following plugins, please refer to our dedicated deep-dive guides:
- W3 total cache
- Solving the Facebook Post Sharing Issue with Comet Cache and Super Page Cache
- LiteSpeed
It would also be interesting
- Setting Up the Anti-Spam by CleanTalk and LiteSpeed Cache (LSCache)How to Set Up the Anti-Spam by CleanTalk and LiteSpeed Cache (LSCache) LiteSpeed cache may interfere...
- Setting Up the Anti-Spam by CleanTalk and W3 Total Cache PluginsHow to Set Up the Anti-Spam by CleanTalk and W3 Total Cache Caching of website pages and using...
- CleanTalk False Positives: Root Cause AnalysisCleanTalk False Positives: Root Cause Main Cause: Incorrect Form Parameter Collection User Email...