Using reCAPTCHA with MediaWiki
Stay organized with collections
Save and categorize content based on your preferences.
Important: Version 1.0 of the reCAPTCHA API is no longer supported, please upgrade to Version 2.0. Learn more
The reCAPTCHA MediaWiki plugin uses a CAPTCHA to prevent spam.
Here is how to add reCAPTCHA to MediaWiki:
Download the zip file (note that this
plugin only works with MediaWiki 1.8 or newer).
Unzip the MediaWiki extension.
cd /path/to/mediawiki/extensions/
# * gets whatever version you downloaded
unzip ~/recaptcha-mediawiki-*.zip
# move the package to a standardized directory.
mv recaptcha-mediawiki-* recaptcha
Add the following lines to MediaWiki's LocalSettings.php:
require_once( "$IP/extensions/recaptcha/ReCaptcha.php" );
// Sign up for these at https://www.google.com/recaptcha/admin#createsite
$recaptcha_public_key = '';
$recaptcha_private_key = '';
Enter the public and private keys in LocalSettings.php. (If you haven't done so, you must sign up for reCAPTCHA
keys here.)
That's it! You should have CAPTCHAs now!
-
When do CAPTCHAs get displayed? How do I tune this?
-
By default, CAPTCHAs are triggered on the following events:
- New user registration
- Anonymous edits that contain new external links
- Brute-force password cracking
These settings can be tuned in LocalSettings.php. See ConfirmEdit.php for possible options
-
How do I uninstall reCAPTCHA?
-
Simply remove the line you added to LocalSettings.php. You can also
delete the folder you created in the extensions directory.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["reCAPTCHA Version 1.0 is no longer supported; users must upgrade to Version 2.0."],["This reCAPTCHA MediaWiki plugin helps prevent spam by requiring users to solve a CAPTCHA."],["To install the plugin, download the zip file, unzip it in the extensions directory, add the required lines to LocalSettings.php with your reCAPTCHA keys, and you're set."],["CAPTCHAs are typically displayed for new user registration, anonymous edits with external links, and brute-force password attempts, but these settings can be adjusted."],["Uninstalling the plugin involves simply removing the added line from LocalSettings.php and deleting the extension folder."]]],[]]