Turnstile Registration Protection
Wordpress-Plugin to block bot user registration, login, reset-password requests
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/henryjobst/turnstile-protection/archive/refs/heads/main.zipWordPress plugin to protect registration, login and password reset with Cloudflare Turnstile.
Features
- ✅ Cloudflare Turnstile integration for registration, login and lost password forms
- ✅ Server-side verification of the Turnstile challenge
- ✅ Simple configuration via WordPress admin
- ✅ Multilingual (English/German) with i18n support
- ✅ Fail-open on login during network errors (no lockout on Cloudflare outage)
- ✅ Bypass for Application Passwords, XML-RPC, REST API and WP-CLI
- ✅ No captcha images to solve
- ✅ Free and unlimited usage
Requirements
- WordPress 5.0 or higher
- PHP 7.4 or higher
- Cloudflare account (free)
Installation
Option A: ZIP upload (recommended)
- Download the latest
turnstile-protection-x.x.x.zipfrom the Releases page - In WordPress admin go to Plugins → Add New → Upload Plugin
- Select the ZIP file and click Install Now
- Click Activate Plugin
Option B: Manual installation
- Download or clone this repository
- Copy the entire
turnstile-protection/folder (includinglanguages/) into:
/wp-content/plugins/turnstile-protection/
The folder structure should look like this:
wp-content/plugins/turnstile-protection/
├── turnstile-protection.php
├── languages/
│ ├── turnstile-protection-de_DE.mo
│ ├── turnstile-protection-de_DE.po
│ └── turnstile-protection.pot
└── README.md
- Go to Plugins in WordPress admin and activate Turnstile Registration Protection
3. Set up Cloudflare Turnstile
- Sign in to Cloudflare
- Navigate to Turnstile in the left menu
- Click Add site
- Fill in the form:
- Site name: Your website name
- Hostname: Your domain (e.g.
example.com) - Widget Mode: Managed
- Click Create
You will receive two keys:
- Site Key (public)
- Secret Key (secret)
4. Configure keys in WordPress
- Go to Settings → Turnstile Protection
- Enter the Site Key
- Enter the Secret Key
- Click Save Changes
How it works
- Visitor opens the registration, login or lost password page
- The Turnstile widget loads automatically
- Visitor completes the challenge (usually invisible)
- On form submission the response is verified server-side
- The action is only executed upon successful verification
Error behavior
- Registration & Lost Password: Fail-closed — blocked on network errors or missing tokens
- Login: Fail-open on network errors — prevents admin lockout during Cloudflare outages. Missing or invalid tokens are still blocked.
Troubleshooting
Widget not showing
- Verify that Site Key and Secret Key are entered correctly
- Check the browser console for JavaScript errors
- Make sure no ad blockers are blocking the script
Verification fails
- Verify that the Secret Key is correct
- Ensure the hostname in Cloudflare matches your domain
- Check that your server allows outgoing HTTPS requests
GDPR notice
Cloudflare Turnstile is GDPR compliant. More information: https://www.cloudflare.com/privacypolicy/
License
MIT License — see LICENSE
Turnstile Registration Protection (Deutsch)
WordPress-Plugin zum Schutz der Benutzerregistrierung mit Cloudflare Turnstile.
Funktionen
- ✅ Cloudflare Turnstile Integration in Registrierung, Login und Passwort-vergessen
- ✅ Serverseitige Verifizierung der Turnstile-Challenge
- ✅ Einfache Konfiguration über WordPress-Admin
- ✅ Mehrsprachig (Deutsch/Englisch) mit i18n-Support
- ✅ Fail-open beim Login bei Netzwerkfehlern (kein Lockout bei Cloudflare-Ausfall)
- ✅ Bypass für Application Passwords, XML-RPC, REST API und WP-CLI
- ✅ Keine Captcha-Bilder lösen nötig
- ✅ Kostenlos und unbegrenzt nutzbar
Voraussetzungen
- WordPress 5.0 oder höher
- PHP 7.4 oder höher
- Cloudflare-Account (kostenlos)
Installation
Option A: ZIP-Upload (empfohlen)
- Laden Sie die neueste
turnstile-protection-x.x.x.zipvon der Releases-Seite herunter - Gehen Sie in WordPress-Admin zu Plugins → Installieren → Plugin hochladen
- Wählen Sie die ZIP-Datei aus und klicken Sie auf Jetzt installieren
- Klicken Sie auf Plugin aktivieren
Option B: Manuelle Installation
- Laden Sie dieses Repository herunter oder klonen Sie es
- Kopieren Sie den gesamten Ordner
turnstile-protection/(inkl.languages/) nach:
/wp-content/plugins/turnstile-protection/
Die Ordnerstruktur sollte so aussehen:
wp-content/plugins/turnstile-protection/
├── turnstile-protection.php
├── languages/
│ ├── turnstile-protection-de_DE.mo
│ ├── turnstile-protection-de_DE.po
│ └── turnstile-protection.pot
└── README.md
- Gehen Sie zu Plugins in WordPress-Admin und aktivieren Sie Turnstile Registration Protection
3. Cloudflare Turnstile einrichten
- Melden Sie sich bei Cloudflare an
- Navigieren Sie zu Turnstile im linken Menü
- Klicken Sie auf Add site
- Füllen Sie das Formular aus:
- Site name: Ihr Website-Name
- Hostname: Ihre Domain (z.B.
example.com) - Widget Mode: Managed
- Klicken Sie auf Create
Sie erhalten nun zwei Keys:
- Site Key (öffentlich)
- Secret Key (geheim)
4. Keys in WordPress konfigurieren
- Gehen Sie zu Einstellungen → Turnstile Schutz
- Tragen Sie den Site Key ein
- Tragen Sie den Secret Key ein
- Klicken Sie auf Änderungen speichern
Funktionsweise
- Besucher öffnet die Registrierungs-, Login- oder Passwort-vergessen-Seite
- Turnstile-Widget wird automatisch geladen
- Besucher löst die Challenge (meist unsichtbar)
- Bei Absenden des Formulars wird die Antwort serverseitig verifiziert
- Nur bei erfolgreicher Verifizierung wird die Aktion ausgeführt
Fehlerverhalten
- Registrierung & Passwort-vergessen: Fail-closed — bei Netzwerkfehlern oder fehlendem Token wird die Aktion blockiert
- Login: Fail-open bei Netzwerkfehlern — verhindert Admin-Lockout bei Cloudflare-Ausfall. Fehlende oder ungültige Tokens werden weiterhin blockiert
Fehlerbehebung
Widget wird nicht angezeigt
- Prüfen Sie, ob Site Key und Secret Key korrekt eingetragen sind
- Prüfen Sie die Browser-Konsole auf JavaScript-Fehler
- Stellen Sie sicher, dass keine Ad-Blocker das Skript blockieren
Verifizierung schlägt fehl
- Prüfen Sie, ob der Secret Key korrekt ist
- Stellen Sie sicher, dass der Hostname in Cloudflare mit Ihrer Domain übereinstimmt
- Prüfen Sie, ob Ihr Server ausgehende HTTPS-Anfragen zulässt
DSGVO-Hinweis
Cloudflare Turnstile ist DSGVO-konform. Weitere Informationen: https://www.cloudflare.com/de-de/privacypolicy/
Lizenz
MIT License — siehe LICENSE
Support
Bei Problemen oder Fragen erstellen Sie bitte ein Issue im Repository.