Anonymous User
(@anonymized-17490918)
I also have this problem. I’d really like to see how to resolve this using the WP CLI if possible.
Thread Starter
raiwp
(@raiwp)
Just solved a few minutes ago:
Go to site via FTP (e.g. FileZilla): yoursite.com –> wp-content –> plugins –> rename the file that contains authentication-plugin…
When done you can Login without 2FA and modify your settings in WP backend anew…
Hello @raiwp and @bwackwat
If you have 2FA setup and you cannot get the code, then there is not much you can do but to disable the plugin as @raiwp recommended.
That is why we recommend everyone to generate 2FA backup codes, they are a life saviour when you cannot get a code from your smartphone app.
Please do not hesitate to ask should you have any other questions.
Anonymous User
(@anonymized-17490918)
Thanks. Additionally, the following SQL allowed me to reset my 2FA settings:
DELETE FROM wp_usermeta WHERE meta_key = 'wp_2fa_enabled_methods' AND user_id = <USER_ID>;
INSERT INTO wp_usermeta (user_id, meta_key, meta_value) VALUES (<USER_ID>, 'wp_2fa_user_enforced_instantly', 1);
Best regards.