WordPress GuideSecurity → Add Cloudflare Captcha

How to add Cloudflare CAPTCHA on WordPress

Tired of spam on your WordPress forms, logins, or comments? Cloudflare Turnstile gives you a free, privacy-first CAPTCHA that doesn’t make users solve puzzles or check boxes. It’s a smooth, invisible way to stop bots—and it takes just minutes to set up.

Let’s walk through how to add Cloudflare Turnstile to your WordPress site using a plugin or form builder.

What is Cloudflare Turnstile and why use it?

Cloudflare Turnstile is a CAPTCHA alternative that protects your site from bots and spam without frustrating your visitors. It doesn’t show challenges like “select all crosswalks” or “click the fire hydrants.” Instead, it checks behind the scenes whether the user is real, using browser signals and invisible logic.

It’s 100% free, works with or without a Cloudflare proxy, and respects user privacy. No personal data gets sent to Google or other third parties.

Step 1: Create a Cloudflare account

Before you can use Turnstile, you’ll need a free Cloudflare account.

Once you’re in, you’ll be able to manage your sites and services from the Cloudflare dashboard.

Step 2: Add your WordPress site to Cloudflare (optional but helpful)

You don’t need to proxy your domain through Cloudflare to use Turnstile, but if you want extra security, performance, and protection, it’s worth doing.

If you skip this step, Turnstile will still work—just choose “I’m not proxying traffic” when setting up your site.

Step 3: Get your Turnstile site key and secret key

These keys let WordPress connect to Cloudflare Turnstile.

Step 4: Add Turnstile to WordPress using a plugin

The easiest way to add Turnstile to login pages, comments, or WooCommerce is with a plugin.

That’s it! Turnstile will now show up where you selected, and visitors won’t see any annoying puzzles.

Step 5: Add Turnstile to forms using a form builder

If you use a form plugin like WPForms, Formidable Forms, or Gravity Forms, you can add Turnstile directly to your forms.

WPForms

Note: Turnstile is only available in the WPForms Pro version.

Formidable Forms

Other form plugins may support Turnstile with an add-on or shortcode. Always check the plugin’s documentation for details.

Step 6: Configure Turnstile widget behavior

Cloudflare gives you three widget modes. You can pick the best one for your site during setup or change it later in the Turnstile dashboard.

Most WordPress users should stick with Managed unless you want more control over the appearance.

Step 7: Test and troubleshoot your CAPTCHA setup

After adding Turnstile, test your forms and logins to make sure everything works.

Common Cloudflare CAPTCHA issues

If all else fails, try temporarily switching to a default theme like Twenty Twenty-Four and disabling other security plugins to narrow down the issue.

Add Turnstile to WooCommerce or custom forms

The Simple Cloudflare Turnstile plugin includes built-in support for WooCommerce. You can enable CAPTCHA for:

If you’re building a custom form and need to manually insert the CAPTCHA, use the plugin’s shortcode:

[cloudflare-turnstile]

Place this inside your form HTML or page editor, and Turnstile will show up.

Additional resources

Comprehensive guide to securing WordPress with ModSecurity

This guide provides a comprehensive overview of how to use ModSecurity to enhance the security of your WordPress site.

How to prevent content sniffing in WordPress →

Protect your WordPress site from MIME-type attacks by preventing content sniffing in browsers.




Why security matters for WordPress enterprise hosting

Use the blog as your guide to attacks to watch out for, security best practices, and steps to improve the WordPress protection you already have.