Title: Plugin works, but completely breaks WP CLI
Last modified: June 20, 2023

---

# Plugin works, but completely breaks WP CLI

 *  [trulycool](https://wordpress.org/support/users/trulycool/)
 * (@trulycool)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/plugin-works-but-completely-breaks-wp-cli/)
 * Greetings!
 * Got the plugin installed and working yesterday. But today when I went in to use
   wp cli, the is completely broken.
 * To be clear, the site works fine, and can log in to admin via web interface, 
   but wp-cli throws a fatal error. Tried adding –skip-plugins=memcached, but same
   error occurs.
 * “Fatal error: Uncaught Error: Class ‘Memcache’ not found”
   …and reference line
   849, where:$this->mc[ $bucket ] = new Memcache();Again, both memcached server&
   PECL memcache installed and working. But wp cli, which is a critical management
   tool is broken until I remove object-cache.php (or rename it to object-cache.
   php.OFF in this case).
 * Any idea as to how this critical error might be addressed?
 * Thanks much,
   Morgan

Viewing 1 replies (of 1 total)

 *  Thread Starter [trulycool](https://wordpress.org/support/users/trulycool/)
 * (@trulycool)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/plugin-works-but-completely-breaks-wp-cli/#post-16832170)
 * **UPDATE:** this turns out to be related to the managed VPS where my site runs.
   And it is now fixed 🙂
 * The php.ini they gave me access to (as I don’t have sudo) was in ~/public_html/
   fcgi-bin, and I blithely assumed that would include PHP CLI…
 * So tho I had enabled the PECL memcache extension for the regular web PHP, it 
   was not available via PHP CLI, which is essentially a different beast, and what
   wp-cli uses.
 * Finally figured it out while reporting the error to the wp-cli repo, and looking
   for solutions to offer there…contacted my VPS support, and had them add it to
   the actual system php.ini, and now wp-cli works as expected w/ Memcached Object
   Cache enabled 🙂
 * Thanks for the excellent plugin; much appreciated!
 * All the best,
   Morgan🙏

Viewing 1 replies (of 1 total)

The topic ‘Plugin works, but completely breaks WP CLI’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/memcached.svg)
 * [Memcached Object Cache](https://wordpress.org/plugins/memcached/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/memcached/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/memcached/)
 * [Active Topics](https://wordpress.org/support/plugin/memcached/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/memcached/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/memcached/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [trulycool](https://wordpress.org/support/users/trulycool/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/plugin-works-but-completely-breaks-wp-cli/#post-16832170)
 * Status: not resolved