Simple CAPTCHA with Cloudflare Turnstile

How can we help?

Search the documentation or ask the AI agent anything about the plugin.

Caching and optimisation plugins

Updated September 13, 2026

Caching and optimisation plugins routinely delay, combine or lazy-load JavaScript. Doing that to the Turnstile scripts stops the widget rendering, which is the single most common reason a correctly configured setup shows nothing on the front end.

What the plugin already handles

Performance Plugin Compatibility, in the Advanced Settings panel, is on by default and adds exclusions for the optimisation plugins the integration knows about:

  • WP Rocket
  • LiteSpeed Cache
  • Autoptimize
  • Perfmatters
  • SiteGround Optimizer

The plugin’s script tags also carry data-cfasync="false", which tells Cloudflare Rocket Loader to leave them alone. Both the external Turnstile script and the plugin’s own inline scripts are marked.

Leave the compatibility option on unless it conflicts with something specific in your setup.

When you still need manual exclusions

You will need to add exclusions yourself if you use an optimisation plugin that is not on the list above, or if you have turned the compatibility option off. Exclude:

  • challenges.cloudflare.com — Cloudflare’s own script
  • Everything under /wp-content/plugins/simple-cloudflare-turnstile/js/
  • Inline scripts whose ID starts with cfturnstile

The setting to look for is usually named “delay JavaScript execution”, “defer JS”, “combine JS” or “lazy load scripts”. Excluding the files from minification alone is rarely enough — it is the delaying and combining that breaks things.

Page caching

Page caching itself is generally fine. The widget is rendered client-side and the token is generated per visit, so a cached page still produces a fresh token. Two things to watch:

  • Do not cache the checkout, cart, account or login pages. That is standard advice for WooCommerce anyway, and every serious caching plugin excludes them by default.
  • Cached pages and whitelisting can disagree. If you whitelist logged-in users, a page cached for anonymous visitors may be served to a logged-in one, or the other way round. Make sure your cache serves logged-in users separately.

Diagnosing it

If the widget is missing, clear all caches and load the form in a private window. If it appears with caching disabled and vanishes with it enabled, the optimisation settings are the cause. The browser console usually shows the Turnstile script either missing or loaded after the plugin’s own script tried to use it.

Related

Was this article helpful?