Title: W3TC WP-CLI problem
Last modified: February 25, 2019

---

# W3TC WP-CLI problem

 *  Resolved [tommy4](https://wordpress.org/support/users/tommy4/)
 * (@tommy4)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/w3tc-wp-cli-problem/)
 * Since some time (I think after upgrade to WordPress 5.1) the W3TC plugin does
   not work with WP-CLI (or either way, the WP-CLI does not work with W3TC).
 * When trying to run WP-CLI commands I get:
    Fatal error: Cannot redeclare wp_cache_add()(
   previously declared in /var/www/xxx/wordpress/wp-content/object-cache.php:92)
   in /var/www/xxx/wordpress/wp-includes/cache.php on line 31
 * When I disable W3TC it works fine.

Viewing 1 replies (of 1 total)

 *  Thread Starter [tommy4](https://wordpress.org/support/users/tommy4/)
 * (@tommy4)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/w3tc-wp-cli-problem/#post-11243846)
 * After deactivating and activating everthing works OK.

Viewing 1 replies (of 1 total)

The topic ‘W3TC WP-CLI problem’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [tommy4](https://wordpress.org/support/users/tommy4/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/w3tc-wp-cli-problem/#post-11243846)
 * Status: resolved