Title: WP-CLI commands fail when plugin is enabled
Last modified: February 2, 2021

---

# WP-CLI commands fail when plugin is enabled

 *  Resolved [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wp-cli-commands-fail-when-plugin-is-enabled/)
 * In trying to build a development workflow system, I was trying to deactivate 
   the Stop Spammers plugin on specific staging environments using the WP-CLI command“
   plugin deactivate”. However, even when I have the IP address of the WP-CLI client
   machine (127.0.0.1) included in the “Allow” list, I still get prompted for a 
   password when trying to deactivate the plugin. Other plugins I try to also deactivate
   have no problem, and no password is prompted for those. Just Stop Spammers asks
   for a password upon plugin deactivation commands. Any idea why and how I can 
   configure it to allow itself to be deactivated via WP-CLI commands on staging
   environments?

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

 *  Anonymous User
 * (@anonymized-5837566)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wp-cli-commands-fail-when-plugin-is-enabled/#post-13989933)
 * Hmm, that’s pretty interesting. I don’t believe there’s anything specific to 
   WP-CLI baked into Stop Spammers. Rather, it seems like the plugin is just protecting
   itself, which is actually pretty cool. Most likely, it probably comes down to
   how Stop Spammers interprets IPs.
 * You might try whitelisting the router IP, the device IP, and your public internet
   IP as well just in case.
 * And just to double-check, Stop Spammers isn’t actually interfering with any commands
   other than just when you’re trying to deactivate SS? I actually think the original
   creator may have baked in that only a whitelisted admin can deactivate it, which
   makes sense as to why it would direct you to log in.
 *  Thread Starter [Rob Watson](https://wordpress.org/support/users/rcwatson/)
 * (@rcwatson)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wp-cli-commands-fail-when-plugin-is-enabled/#post-13994853)
 * Thanks for the tip. I allowed the other IPs as you noted and it seems to have
   solved the issue. It also occurs to me that just waiting for a timeout after 
   some previously blocked action may have done the trick as well. We’ll see.
 *  Anonymous User
 * (@anonymized-5837566)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/wp-cli-commands-fail-when-plugin-is-enabled/#post-13994879)
 * You’re welcome.

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

The topic ‘WP-CLI commands fail when plugin is enabled’ is closed to new replies.

 * ![](https://ps.w.org/stop-spammer-registrations-plugin/assets/icon-256x256.png?
   rev=3377746)
 * [Stop Spammers Classic](https://wordpress.org/plugins/stop-spammer-registrations-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stop-spammer-registrations-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stop-spammer-registrations-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/stop-spammer-registrations-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stop-spammer-registrations-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stop-spammer-registrations-plugin/reviews/)

## Tags

 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 3 replies
 * 2 participants
 * Last reply from: Anonymous User
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/wp-cli-commands-fail-when-plugin-is-enabled/#post-13994879)
 * Status: resolved