Title: make plugin work with wp cli login
Last modified: December 6, 2023

---

# make plugin work with wp cli login

 *  Resolved [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/)
 * using wp-2fa causes wordpress to throw errors when using wp cli login.
   [https://github.com/wpwhitesecurity/wp-2fa/issues/82](https://github.com/wpwhitesecurity/wp-2fa/issues/82)
    -  This topic was modified 2 years, 5 months ago by [chrillep](https://wordpress.org/support/users/chrillep/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fmake-plugin-work-with-wp-cli-login%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17258918)
 * Thank you for reporting this Chrillep.
 * Can you please share more details / be more specific? The more details you can
   share the quicker we can find the cause of this issue.
 * Any specific usage of wp cli login, and what are the errors?
 * Looking forward to hearing from you.
 *  Thread Starter [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17298780)
 * Yeah sure 🙂 
   steps to reproduce.
 * install wp login cli
 * [https://aaemnnost.tv/wp-cli-commands/login/](https://aaemnnost.tv/wp-cli-commands/login/)
   
   [https://github.com/aaemnnosttv/wp-cli-login-command](https://github.com/aaemnnosttv/wp-cli-login-command)
 * try and login with a user that exists
 * `wp login as 1`
 * see that the generated login link **WORKS**
 * install and setup 2fa plugin
 * try and login with a user that exists
 * `wp login as 1`
 * see that the generated login link **FAILS**
 * 🙂
    -  This reply was modified 2 years, 5 months ago by [chrillep](https://wordpress.org/support/users/chrillep/).
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17313497)
 * Thank you for the explanation Chrillep. I’ve asked for more details because I
   thought you wanted the ability to configure the plugin via WP CLI, rather than
   this.
 * Question: what do you expect in this case, for 2FA to be bypassed or to be asked
   for a code?
 *  [Triggerfish](https://wordpress.org/support/users/triggerfishab/)
 * (@triggerfishab)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17314428)
 * just that the generated link should log you in as intended.
   If that means bypassing
   2fa then yes.If you are able to run wp cli commands you have the rights (is my
   thought).
 *  Thread Starter [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17317466)
 * just that the generated link should log you in as intended.
   If that means bypassing
   2fa then yes.If you are able to run wp cli commands you have the rights (is my
   thought).
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17392463)
 * Sorry for the delay in replying to this. Just wanted to let you know that we 
   will be looking into this and we’ll certainly be doing something in the next 
   update.
 * In the meantime, if you have any other questions, please do not hesitate to ask.
 * Have a great weekend.
 *  Thread Starter [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17419029)
 * great! thank you! the login command is such a time saver as a developer!
    -  This reply was modified 2 years, 3 months ago by [chrillep](https://wordpress.org/support/users/chrillep/).
 *  Thread Starter [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17695959)
 * hey [@robert681](https://wordpress.org/support/users/robert681/) thanks for fast
   replies!
   You got any status on this ? =)
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17697447)
 * Hello Chrillep,
 * I am afraid we do not have any ETA for this, however, it should be included in
   the next update.
 * I am sorry I cannot give you any date, but we do not give any ETAs for releases,
   especially for the free plugins.
 * Should you have any other questions please do not hesitate to ask.
 * Have a great day.
 *  Thread Starter [chrillep](https://wordpress.org/support/users/chrillep/)
 * (@chrillep)
 * [2 years ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17777918)
 * Thats ok. Promising means delivering 🙂 
   for now im via WP-CLI
    - disabling wp-2fa
    - running login command
    - enabling wp-2fa
 *  Plugin Contributor [robertabela](https://wordpress.org/support/users/robert681/)
 * (@robert681)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17810577)
 * Hello,
 * We are wrapping up the next update of WP 2FA and we have also looked into this.
   There are a few issues and we have to implement a lot of work-arounds to support
   this one, which might affect the functionality of other things. So for now we
   decided not to support this WP CLI extension / command.
 * Should this become more widely used and better supported, we’ll look into it 
   again.
 * I am sorry this is not the answer you were looking for, but this is the best 
   we can do at the moment.

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

The topic ‘make plugin work with wp cli login’ is closed to new replies.

 * ![](https://ps.w.org/wp-2fa/assets/icon-256x256.png?rev=2961533)
 * [WP 2FA - Two-factor authentication for WordPress](https://wordpress.org/plugins/wp-2fa/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-2fa/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-2fa/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-2fa/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-2fa/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-2fa/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [robertabela](https://wordpress.org/support/users/robert681/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/make-plugin-work-with-wp-cli-login/#post-17810577)
 * Status: resolved