Skip to content
EnterraHost
Products
Tools
Hosting Email Support Client Area Find a domain

Install Turnstile on MyBB

MyBB 1.8.40 shipped its own Turnstile, which means the answer to "how do I install one" depends on the version in front of you. On an older board the plugin is the only Turnstile there is. On a newer one the board already covers registration and posting, and the plugin adds only the surfaces MyBB has never protected.

This guide covers both, because the steps are the same and only the expectation changes.

Before you start

You need a Cloudflare account, which is free, and a Turnstile widget. Create it at Cloudflare, add the hostname of your forum, and copy the site key and the secret key. The widget is per hostname, so a forum at example.com/forum/ is registered as example.com rather than with the path.

You also need write access to inc/plugins/ on the server, and the PHP curl extension. Both are ordinary for MyBB.

Install

  1. Download the zip from the product page.
  2. Unzip it. Inside is an Upload directory holding inc/plugins/turnstile.php and a directory inc/plugins/turnstile/.
  3. Copy both into your board, keeping the paths. The single file is the loader MyBB reads, and the directory holds the rest.
  4. Go to Configuration, then Plugins, find Cloudflare Turnstile and click Activate.
  5. Go to Board Settings, then Cloudflare Turnstile and paste the two keys, unless the board already has them.

Activation creates the settings, the analytics table and the statistics page link. No MyBB core file is edited.

When the board already has Turnstile

On MyBB 1.8.40 and newer there is a site key and a secret stored under General Settings. The plugin uses those and labels its own two fields as not in use, so you are never asked for the same key twice and the two never disagree.

It also checks what the running board can actually do rather than reading a version number, and it covers only what is missing. That is what stops the failure this plugin exists to avoid, which is two widgets on one form or a form that asks for a check nothing can perform.

Check that it works

Go to Tools and Maintenance, then Statistics, scroll to Turnstile diagnostics and run the tests. The verification test sends a deliberately invalid token, so the answer is a diagnosis rather than a pass or fail.

ResultWhat it means
invalid-input-responseWorking. The keys were accepted and only the bad token was refused.
invalid-input-secretThe secret key is wrong or was copied with a character altered.
No answer at allThe server cannot reach Cloudflare. Check its outbound firewall and DNS.
Test keys in useCloudflare test keys accept everything, so the board is not protected.

Then open the login page in a private window and confirm the widget appears above the password field.

Summarize this guide with

You need an account with the assistant you choose. It fetches the guide itself, and you send the prompt, not us.

Every guide in this category is on the Plugins page.

Something here wrong, or out of date? Tell us at editorial@enterrahost.com.