Disable 2fa without admin access – locked out
-
I inadvertently enabled 2fa without setting up an app on my device! So I’m locked out of my admin console. Is there a way to disable 2fa in PhpMyAdmin?
-
Hi, add
define(‘TWO_FACTOR_DISABLE’, true);in wp-config.php file. This will disable 2FA. When you want to enable 2FA again remove the code or set it to false.Kind regards.
Thank you for your quick reply.
I tried that, before I posted my question. It doesn’t seem to work.
I’ve emptied the cache in my browser(s). I’m running the lates WP. I get an alert at the top of the login window: “TWO_FACTOR_DISABLE’ – assumed ‘‘TWO_FACTOR_DISABLE’’ (this will throw an Error in a future version of PHP) in /volume1/web/chewit/wp-config.php on line 93”
Hi, do you also have a cache plugin running in your site? Does your server run any cache system? Are you using a CDN service by any chance?
Kind regards.
I the relevant (I think) plugins i’m running are wp-fastest-cache and health-check. I’m not sure what a CDN is, I googled it, and my guess in no, I’m not.
Thanks again.
Thank you for providing more information. I think your best option is to try and reset the plugin. This will help with the issue you are having now with the 2FA setting. Please check the following documentation.
https://mbrsolution.com/wordpress/how-to-reset-aiowps-plugin.php
Let me know how you go.
Kind regards.
-
This reply was modified 2 years, 9 months ago by
mbrsolution.
I’ve tried that too. When I get to step 3 and navigate to installed plugins, I get prompted to login again with this message:
Your session has expired because it has been over 600 minutes since your last login. Please log back in to continue.But it hasn’t been 600 minutes. Anyway, I login again, and am still prompted for 2FA.
I really appreciate your work on this.
b
Hi, did you try step 7 ) in the documentation I shared above? The following instructions in step 7 ) can help you further.
https://mbrsolution.com/wordpress/remove-all-in-one-wp-security-database-tables.php
Kind regards.
-
This reply was modified 2 years, 9 months ago by
mbrsolution.
I tried some of this previously. But you loose me at the middle of step 6. You tell me how to click Edit. But you don’t tell me how to search in there. I’ve tried a few things in “Edit” but I can’t find anything. Can you please elaborate on what go do after I click Edit.
Attached are the remaining entries that I don’t know how to search into:
GRRRRR!

-
This reply was modified 2 years, 9 months ago by
wowmomcs. Reason: Why can't I just upload an image!?
Ok. Well, at first it didn’t work. But now it has. I was able to login and shut off 2FA for my account.
My apologies if my instructions are not 100% correct. I will try and edit them so they make more sense. I am also glad you were able to fix your issue. Enjoy the plugin.
Kind regards.
-
This reply was modified 2 years, 9 months ago by
mbrsolution.
-
This reply was modified 2 years, 9 months ago by
The topic ‘Disable 2fa without admin access – locked out’ is closed to new replies.