Title: invalid authentication code
Last modified: July 13, 2023

---

# invalid authentication code

 *  Resolved [horacekz](https://wordpress.org/support/users/horacekz/)
 * (@horacekz)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/invalid-authentication-code/)
 * ASAP – hello, I’m having trouble logging in. I have two-step verification set
   up using a verification code. The code has always worked and today it says an
   error. I don’t have any other authentication set up like SMS or email. How can
   I log in or restart authentication? I read that overwriting the folder in FTP
   can help, but that didn’t help. This is a free license.
   Thank you,Zdenek Horacek,
   Czech Republic
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvalid-authentication-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/invalid-authentication-code/#post-16892024)
 * Hi [@horacekz](https://wordpress.org/support/users/horacekz/), thanks for your
   message.
 * If you’re using Wordfence’s 2FA and don’t have access to your backup codes, simply
   renaming the **/wp-content/plugins/wordfence** directory to **wordfence.bak**,
   logging in with your username and password combination, then renaming the plugin
   back to its original name should let you set 2FA back up again. Sometimes server
   migrations by hosts, or other reasons around timezones/offsets cause a previously
   working authentication code to fail.
 * If you tried this and still can’t gain access, the precise error message you’re
   seeing on the login page would be helpful to determine which stage of the login
   may be having problems.
 * Thanks,
   Peter.
 *  Thread Starter [horacekz](https://wordpress.org/support/users/horacekz/)
 * (@horacekz)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/invalid-authentication-code/#post-16892227)
 * [@wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Thanks for the reply, but I can’t do it.
 * I overwrote the folder. I tried removing it too. But when I try to login to my
   site it asks for authentication. It says the code is wrong. There is no other
   way to verify or request a renewal. I can’t get any further. The exact message
   is “ERROR: Invalid verification code.”
   Is it possible that the WF plugin folder
   is duplicated somewhere? But where?
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/invalid-authentication-code/#post-16903426)
 * Hi [@horacekz](https://wordpress.org/support/users/horacekz/), thanks for the
   extra information.
 * Any “VERIFICATION REQUIRED” messages and emails are related to the message Google
   will send back when the user fails to be confirmed as human by reCAPTCHA checks.
   However, reCAPTCHA should also be disabled if the “wordfence” folder is either
   renamed or not present.
 * 2FA is also disabled using the rename method, and Wordfence will always be present
   in **/wp-content/plugins/wordfence** by default. Do you have any other plugins
   that may be implementing 2FA/reCAPTCHA features, or a custom login URL as part
   of your theme or membership plugins?
 * Thanks again,
   Peter.
 *  Thread Starter [horacekz](https://wordpress.org/support/users/horacekz/)
 * (@horacekz)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/invalid-authentication-code/#post-16905712)
 * [@wfpeter](https://wordpress.org/support/users/wfpeter/) Hello, I managed to 
   solve it. It really didn’t work via FTP. So I got to the MySQL database where
   I disabled wordfence and then had free access. Thank you for your time!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘invalid authentication code’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

## Tags

 * [2fa](https://wordpress.org/support/topic-tag/2fa/)

 * 4 replies
 * 2 participants
 * Last reply from: [horacekz](https://wordpress.org/support/users/horacekz/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/invalid-authentication-code/#post-16905712)
 * Status: resolved