Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Plugin how-tos · Guide

How to Add Cloudflare Turnstile to WordPress

Short answer

To add Cloudflare Turnstile to WordPress, create a free widget in the Cloudflare dashboard to get a site key and a secret key. Then install the free Simple CAPTCHA with Cloudflare Turnstile plugin, paste both keys into Settings > Cloudflare Turnstile, run the API test, and tick the forms to protect.

Key takeaways

  • Turnstile is free on the Free plan, with up to 20 widgets, 10 hostnames per widget, and unlimited challenges as of November 2026.
  • Each widget has a public site key for the page and a private secret key that stays on the server.
  • Managed mode is the recommended mode, showing a checkbox only when a visitor looks risky.
  • Tokens expire after 300 seconds and can be checked only once, so slow forms may need a fresh challenge.
  • The plugin will not enforce Turnstile until its TEST API RESPONSE check passes.
  • Test keys always pass, so swap in your real keys before you launch the site.

What is Cloudflare Turnstile?

Cloudflare Turnstile is a free check that confirms a form visitor is human without showing a puzzle.

It runs small browser checks in the background and issues a token when the visitor passes. Your server then sends that token to Cloudflare to confirm it is valid, as Cloudflare's get-started guide explains.

A token is a string of up to 2,048 characters, and each token can be checked only once. Tokens expire after 300 seconds, which is 5 minutes, so a slow form can outlive its token.

Turnstile is not the same as a full-page Cloudflare challenge. It sits inside one form, such as a login or contact form, and it checks only that submission.

Turnstile is widely used: Cloudflare says it now processes about 3 billion verifications on a typical weekday, as of November 2026.

What do you need before you start?

You need a free Cloudflare account, a WordPress site with admin access, and about 15 minutes.

You do not need to move your DNS or traffic to Cloudflare. Cloudflare's get-started guide states that Turnstile works on any website, even one that is not proxied through the Cloudflare network.

Check your site first. WordPress.org recommends PHP 8.3 or greater, MariaDB 10.11 or greater or MySQL 8.0 or greater, and HTTPS support, as of November 2026, on its Requirements page.

Make a backup before you change login or checkout forms. A recent backup lets you undo a bad setting fast, and our guide to how to back up WordPress covers the options.

You also need the list of forms you want to protect. Start with login, registration, and comments, then add contact and checkout forms next.

How do you create a Turnstile widget and get your keys?

You create a widget in the Cloudflare dashboard, and Cloudflare then shows you a site key and a secret key.

Follow these steps:

  1. Sign in to the Cloudflare dashboard and open Turnstile.
  2. Select “Add widget” and give the widget a clear name, such as “WordPress login”.
  3. Choose a region, such as Rest of World, and add your site hostname.
  4. Choose Managed mode, which is the recommended mode.
  5. Save the widget and copy the site key and the secret key.

The site key is public and goes in your page HTML. The secret key is private and is used only for server-side checks, according to Cloudflare's get-started guide.

Pick the region with care. Cloudflare states that you cannot change a widget's region after you create it, so delete the widget and make a new one if you pick the wrong region.

Add every hostname the widget will run on, including www and non-www versions if you use both. A widget will not run on a hostname you did not list.

How do you add Turnstile to WordPress with a plugin?

You add Turnstile to WordPress by installing the free Simple CAPTCHA with Cloudflare Turnstile plugin and pasting in your two keys.

The plugin page on WordPress.org says the plugin is completely free with no paid version, and it adds no extra data tracking. Version 1.44.6 was released on 16 November 2026, as of November 2026.

Follow these steps:

  1. In WordPress, go to “Plugins > Add Plugin” and search for “Simple CAPTCHA with Cloudflare Turnstile”.
  2. Click “Install Now”, then “Activate”.
  3. Go to “Settings > Cloudflare Turnstile”.
  4. Paste your site key in the “Site Key” field and your secret key in the “Secret Key” field.
  5. Save the settings, then click “TEST API RESPONSE” and complete the challenge.
  6. Tick the forms you want to protect and save again.

The plugin will not enforce Turnstile on your forms until the API test passes. That guard stops a bad key from locking you out of your own login page.

You can also set the keys with constants in wp-config.php if you prefer not to store them in the database. The plugin author documents CF_TURNSTILE_SITE_KEY and CF_TURNSTILE_SECRET_KEY for that use.

Cloudflare's Turnstile overview explains the widget types and how the checks run without showing visitors a puzzle.

Useful settings to check

  • “Theme” sets the widget look to light, dark, or auto.
  • “Language” sets the widget language, and the plugin is available in 14 languages.
  • “Disable Submit Button” stops the submit button until the challenge is done.
  • “Custom Error Message” sets the text visitors see after a failed check.
  • “Whitelist” can skip Turnstile for logged-in users or named IP addresses.
  • “Failsafe Mode” decides what happens when Cloudflare is down: allow submissions or fall back to reCAPTCHA.
  • “Debug Logging” records Turnstile events to help with fault-finding.

Which forms should you protect first?

Protect your login, registration, password reset, and comment forms first, because bots target those most.

The plugin's WordPress.org page lists those 4 core forms, plus WooCommerce checkout, pay for order, account details, login, registration, and password reset. It also supports WPForms, Fluent Forms, Contact Form 7, Gravity Forms, Formidable Forms, Forminator, and Jetpack Forms.

If you run a store, add WooCommerce checkout and registration next. A spam order or a fake account costs more time to clean up than a spam comment.

For contact forms, check which form plugin you use before you start. Our comparison of Contact Form 7 vs WPForms can help if you are still choosing one.

Turn Turnstile on for one form at a time and test each one. That way, if a form breaks, you know which setting caused it.

Turnstile checks that a visitor is human, but it does not replace a strong login method. Learn what a passkey is if you want password-free sign-in as well.

FormWhy protect itStart here?
WordPress loginStops automated login attemptsYes
WordPress registrationStops fake accountsYes
Password resetStops reset-request abuseYes
CommentsStops comment spamYes
WooCommerce checkoutStops fake ordersAfter core forms
Contact formStops spam messagesAfter core forms

Which widget mode should you choose?

Choose Managed mode unless you have a clear reason to pick another mode.

Managed mode is the recommended mode in Cloudflare's widget docs. It picks a non-interactive check or a checkbox based on the visitor's risk level, with no images or text to decipher.

Non-Interactive mode shows a visible widget with a spinner and never asks the visitor to click. Invisible mode runs in the background with no visible widget at all.

ModeWhat the visitor seesBest for
ManagedOften nothing; a checkbox only for risky visitorsMost WordPress sites
Non-InteractiveA widget with a loading spinnerSites that want visible proof of a check
InvisibleNothing at allClean designs where no widget should show

Invisible mode has one extra rule to note. If you use it, Cloudflare asks you to refer to its Turnstile Privacy Addendum in your own privacy policy, so check that point before you pick it.

You set the mode per widget, not per site. You can make one widget for your login form in Managed mode and a second widget for another form in a different mode.

How much does Cloudflare Turnstile cost?

Turnstile is free on the Free plan, as of November 2026, with limits on widgets, hostnames, and analytics history.

Cloudflare's plans page lists the Free plan at no cost, with up to 20 widgets, unlimited challenges, 10 hostnames per widget, and analytics for 7 days. The Enterprise plan is priced through sales.

The WordPress plugin is also free with no paid version. That means the full setup in this guide costs nothing except your time.

LimitFree planEnterprise plan
PriceFreeContact Sales
WidgetsUp to 20Unlimited
Hostnames per widget10Up to 200
ChallengesUnlimitedUnlimited
Analytics lookback7 days30 days
Remove Cloudflare brandingNoYes
WCAG 2.2 AAA complianceYesYes

Most single sites need only 1 or 2 widgets, so the Free plan covers them. Agencies with many client sites may need more widgets, and each widget can cover up to 10 hostnames.

If you already use Cloudflare for your site, check whether a paid plan adds value elsewhere. Our guide to Cloudflare Free vs Pro for WordPress compares those plans.

How do you check that Turnstile is working?

You check Turnstile by opening a protected form in a private browser window and submitting it as a visitor would.

First, log out of WordPress, or use a private window, so the whitelist for logged-in users does not hide the widget. Then open the login page and look for the Turnstile widget near the submit button.

Submit the form with a real login or a test comment. A pass means the form goes through as normal, while a fail shows the plugin's error message.

Use Cloudflare's test keys on a staging site to check both outcomes. The testing guide lists site key 1x00000000000000000000AA as always passing, with secret key 1x0000000000000000000000000000000AA.

Check your Turnstile analytics in the Cloudflare dashboard after a day of live traffic. If the count of checked tokens is zero, the server-side check may not be running, since Cloudflare notes that missing validation shows as zeroes.

Signs that setup worked

  • The widget appears on each protected form.
  • A normal login, comment, or order goes through.
  • A submission with no token is blocked with your error message.
  • Turnstile analytics show checked tokens, not zeroes.

What mistakes should you avoid?

Avoid these 6 mistakes, because each one can leave your forms open or lock out real visitors.

Never put the secret key in page code. The secret key belongs on the server only, and Cloudflare warns never to expose it in client-side code.

Do not skip the API test. The plugin holds off enforcing Turnstile until the test passes, so a skipped test often means no protection at all.

Do not leave test keys in production. Test keys always pass, so a live site with test keys lets every bot through. Swap in your real keys before launch.

Do not forget a hostname. A widget only runs on the hostnames you listed, so a missing www version can leave one form unprotected.

Do not protect every form at once. Turn on one form, test it, then move to the next, so a fault is easy to trace.

Do not ignore the 5-minute token limit. A visitor who leaves a form open for over 5 minutes may need a fresh challenge, since tokens expire after 300 seconds.

If a form stops working after you turn Turnstile on, turn off that form in the plugin settings first. Then check the keys, the hostname list, and the debug log before you change anything else.

Frequently asked questions

Do I need to use Cloudflare DNS to use Turnstile on WordPress?

No. Turnstile works on any website, even one that is not proxied through Cloudflare. You only need a free Cloudflare account to create a widget and get your site key and secret key, then a WordPress plugin connects those keys to your forms.

Is Cloudflare Turnstile really free for WordPress sites?

Yes. The Free plan costs nothing and includes up to 20 widgets, unlimited challenges, and 10 hostnames per widget, as of November 2026. The Simple CAPTCHA with Cloudflare Turnstile plugin is also free with no paid version, so the setup in this guide has no software cost.

Will Turnstile slow down my WordPress site or annoy visitors?

Most visitors see nothing at all in Managed mode, because the checks run in the background and a checkbox appears only for risky visitors. The widget loads from Cloudflare only on pages with a protected form, so other pages are not affected.

What happens if a visitor leaves a form open for a long time?

Turnstile tokens expire after 300 seconds, which is 5 minutes, and each token can be checked only once. If a visitor waits too long, the form may fail and they will need to reload the page for a fresh challenge before they submit.

Can I use Turnstile on WooCommerce checkout?

Yes. The plugin supports WooCommerce checkout, pay for order, account details, login, registration, and password reset forms. Turn those on after you have tested the core WordPress login and registration forms, and place a test order to confirm checkout still works.

What should I do if the Turnstile widget does not appear?

First check that you completed the TEST API RESPONSE step in Settings > Cloudflare Turnstile, since the plugin will not enforce Turnstile until that test passes. Then check your keys, your hostname list in Cloudflare, and whether a caching plugin or a content security policy is blocking the widget script.

Sources

  1. Get started Cloudflare Docs
  2. Cloudflare Turnstile plans Cloudflare Docs
  3. Turnstile widgets Cloudflare Docs
  4. Test your Turnstile implementation Cloudflare Docs
  5. Simple CAPTCHA with Cloudflare Turnstile WordPress.org
  6. Requirements WordPress.org
  7. Turnstile Cloudflare
  8. Turnstile overview Cloudflare Docs

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test