Title: Two-Factor Authentication Recovery Codes
Last modified: October 11, 2021

---

# Two-Factor Authentication Recovery Codes

 *  Resolved [Mboton](https://wordpress.org/support/users/mboton/)
 * (@mboton)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/two-factor-authentication-recovery-codes/)
 * Hello
    please ask for help. why is my account recovery code CODE INVALID: The
   2FA code provided is either expired or invalid. Please try again.
 * how to return so I can access again
 * example like picture [](https://prnt.sc/1vr9hsd)
 * thank you
    -  This topic was modified 4 years, 8 months ago by [Mboton](https://wordpress.org/support/users/mboton/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftwo-factor-authentication-recovery-codes%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/two-factor-authentication-recovery-codes/#post-14961643)
 * Hi [@mboton](https://wordpress.org/support/users/mboton/), thanks for getting
   in touch.
 * Does the same issue occur with both your 2FA app’s generated code AND your backup
   recovery code(s)? If you only have access to one of those, that’s fine, I just
   wanted to check whether you’d been able to try both methods.
 * You could check whether there are any JavaScript errors in your [browser console](https://www.wordfence.com/help/advanced/troubleshooting/#how-to-inspect-the-browser-console)
   on that page, then paste me a screenshot of what you’re seeing. However, if you
   need immediate access back I’m happy to provide you with instructions:
 * The first way is if you have added the site in Wordfence Central (a free site
   management tool in your account on wordfence.com):
    - Login to Wordfence.com and look for the Configuration tab.
    - Click the gear icon at the end of the row that the site you need to access
      is on.
    -  Scroll down to the Login Security Options section and expand it by clicking
      the small black arrow to the right.
    - In the section that says “Whitelisted IP addresses that bypass 2FA” add your
      public facing IP address.
       _**NOTE : **[You can get your public facing IP by clicking this link](https://www.whatsmyip.org/)._
    - Scroll back to the top of the screen and save the changes.
    - You should now be able to login to your site with just a username and password.
 * If you haven’t added your site to Wordfence Central follow these steps:
    - Please use FTP/SFTP — or any file manager your web host provides via their
      administration panel.
    - Look inside the **/wp-content/plugins/** directory and rename the **wordfence**
      directory to **wordfence.bak**. This will deactivate Wordfence and allow you
      to login without the 2FA code.
    - Once you have logged in to your WordPress admin you can name the folder back
      to **wordfence** again.
    - Go to your user profile and add 2FA back to your account, making sure to download
      the backup codes in case of problems in the future.
 * Thanks,
 * Peter.
 *  Thread Starter [Mboton](https://wordpress.org/support/users/mboton/)
 * (@mboton)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/two-factor-authentication-recovery-codes/#post-14973761)
 * I entered the wordfence website 2FA Code
 * The code I entered failed and the backup code also failed
    CODE INVALID: The 
   2FA code provided is either expired or invalid. Please try again.
 * please help for my account, I can log in again to the wordfence website
 * Thank You
 *  Plugin Support [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * (@wfpeter)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/two-factor-authentication-recovery-codes/#post-14988106)
 * Hi [@mboton](https://wordpress.org/support/users/mboton/),
 * If you have issues with the 2FA code on the Wordfence website rather than on 
   your specific website(s), then please send an email to **lockout @ wordfence .
   com** and provide your email address that is on the account or username, we can
   assist you immediately!
 * Thanks,
 * Peter.

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

The topic ‘Two-Factor Authentication Recovery Codes’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [wfpeter](https://wordpress.org/support/users/wfpeter/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/two-factor-authentication-recovery-codes/#post-14988106)
 * Status: resolved