Locked Out of the Login Page
If login protection is on and Google can't approve the request, the login is rejected with Invalid username or incorrect password!, even with the right password. The usual cause is a missing or wrong key.
You can't change the setting without logging in. Use one of these ways to get back in, starting with the first.
Option 1: Use the override constant
Add one line to wp-config.php, above the line that says That's all, stop editing!:
define( 'INVISIBLE_RECAPTCHA_OVERRIDE', true );
With this constant, every reCAPTCHA check passes. Log in, fix your keys in BerrySecure → Invisible reCaptcha → Settings, then delete the line.
While the line is in wp-config.php, reCAPTCHA protects nothing on your whole site, not only the login. Remove it as soon as you are in.
When it works. It works when the keys are empty. The form is sent without a token, and the constant lets it through.
When it doesn't. It does not work when a key is wrong, for example for another domain. The reCAPTCHA badge then shows an error, and the Log In button does nothing. The browser waits for Google and never sends the form, so the constant is never reached. Use option 2 or 3.
Don't set the constant to false. Every check then fails, including your login.
More about the constant: Filters.
Option 2: Turn the plugin off with WP-CLI
If you have command-line access:
wp plugin deactivate invisible-recaptcha
Log in, fix the keys, then activate the plugin again on the Plugins screen.
Option 3: Rename the plugin folder
- Connect with FTP/SFTP or your host's file manager.
- Open
wp-content/plugins/. - Rename the
invisible-recaptchafolder, for example toinvisible-recaptcha-off. - Log in. WordPress deactivates the plugin because it can't find it.
- Rename the folder back.
- Go to Plugins and activate the plugin.
- Open BerrySecure → Invisible reCaptcha → Settings and fix the keys.
Your saved settings are kept. Before you switch login protection on again, see Keys don't work.
Another way in: the WooCommerce login
The WordPress login setting protects only wp-login.php. If your store has a WooCommerce My account page and WooCommerce → Login form is not ticked, you can log in there and open the admin from your account. See WooCommerce Forms.
Avoid it next time
- Enter and save the keys first.
- Test with a form that is not your login, such as comments.
- Keep a second browser session logged in as an administrator while you test the login form.