Recaptcha blocks access to my WordPress editor

Viewed 953

I tried to install reCAPTCHA v3 on my wordpress website, now I’m unable to login to the Wordpress editor to edit the site. Every time I try to log in, it displays an error: Invalid site key. I tried to remove the domain and the site and secret keys from the reCAPTCHA admin page but the login problem is still there. I believe I put some code in wordpress... but not sure what and where, maybe it was [recaptcha] in the Contact Form 7 5.1 but I'm not sure (I'm not a developer).

3 Answers

Log into your Cpanel or FTP. Look for the directory /public_html/wp-content/plugins and rename the reCAPTCHA plugin folder. For example rename "uber-norecaptcha" to "uber-norecaptcha123". Refresh your WP-admin url. Now you can log in. Don't forget to rename the reCaptcha to it original, then you can deactivate it when you're logged in.

You could try to disable the plugin that added the reCAPTCHA (in this case, Contact Form 7), so you can login again. Then, you can re-enable it and set your site and secret keys properly.

Since you are unable to login, you can't disable the plugin from the WordPress dashboard. Instead you can temporarily move the plugin folder to another location. Navigate to the folder of your WordPress installation → wp-content → plugins and move the contact-form-7 folder.

Just experienced a similar problem, and it persisted for 3 months. But, finally, I found the solution and resolved it. In my case, I went to public_html/wp-content/plugins/wpforo/wpforo.php (I don't know exactly if you have forum installed or not, but forum was causing my login page to inherit login recaptcha without any valid keys).

public function init_hook(){

    //reCAPTCHA on wp-login.php page
    //$this->api->init_wp_recaptcha();
}

This function was calling a recaptcha with invalid keys. All I did was comment out:

$this->api->init_wp_recaptcha()

Another solution to the problem is : Visit your login page, right click and enter the Inspect section. Search for anything that uses wp-login.php in "script" tags. You'll find the plugin that is causing the problem. Search for multiple results and deduce a conclusion. That's what I did.

Related