Cloudflare Turnstile for WHMCS: Installation Guide
This guide explains, step by step, how to install Cloudflare Turnstile for WHMCS addon in your WHMCS instance and connect it to Cloudflare.
Before You Start
Make sure you have:
- WHMCS 8.x or 9.x
- PHP 7.2 or later
- Admin access to WHMCS
- Access to your server files
- A Cloudflare account
Compatibility
- WHMCS versions: 8.x and 9.x
- Supported templates: Twenty-One and Nexus
- Also compatible with child templates based on Twenty-One or Nexus
Part 1: Create Turnstile Keys in Cloudflare
- Sign in to Cloudflare.
- Open Turnstile from your Cloudflare dashboard.
- Click Add Widget (or create a new Turnstile site).
- Enter a name (for example:
WHMCS Client Area). - Add your WHMCS domain under allowed hostnames.
- Example:
billing.example.com
- Example:
- Save.
- Copy both values:
- Site Key
- Secret Key
Keep this page open. You will paste these keys in WHMCS next.
Part 2: Upload the Addon to WHMCS
- On your server, open your WHMCS installation folder.
- Go to:
modules/addons/
- Upload the addon folder so the final path is:
modules/addons/turnstile/
Check that these files exist after upload:
turnstile.phphooks.phplib/Turnstile.phpjs/lang/
Part 3: Activate the Addon in WHMCS
- Log in to WHMCS Admin.
- Go to:
- System Settings -> Addon Modules
- Find Cloudflare Turnstile.
- Click Activate.
- If prompted, assign admin role permissions for the addon.
Part 4: Configure the Addon
- In WHMCS Admin, open addon configuration for Cloudflare Turnstile.
- Set:
- Enable Turnstile = On
- Site Key = (paste from Cloudflare)
- Secret Key = (paste from Cloudflare)
- Choose your widget options:
- Theme:
auto(recommended) - Size:
normal(recommended) - Appearance Mode:
always(recommended to start) - Default Language:
auto
- Theme:
- Enable the forms you want to protect:
- Protect Client Login
- Protect Registration
- Protect Password Reset
- Protect Contact Form
- Protect Ticket Submission
- Protect Cart Checkout
- Save changes.
Recommended First-Time Settings
For most setups, start with:
- Enable Turnstile: On
- Skip Logged-In Users: On
- Theme: Auto
- Size: Normal
- Appearance: Always
- Language: Auto
- All form protections: On
Part 5: Test Everything
Open your WHMCS client area in a private/incognito window and test:
- Login page
- Registration page
- Password reset page
- Contact page
- Ticket submission page
- Checkout page
Expected result:
- Turnstile appears near the submit button.
- Form submits normally when verification passes.
- If verification fails, user sees a friendly error message.
Back to Cloudflare Turnstile for WHMCS
Found an issue? Contact us for corrections or improvements.