Title: WPCLI Error
Last modified: October 3, 2022

---

# WPCLI Error

 *  Resolved [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wpcli-error/)
 * Hello,
 * Getting this error when I try and run any WPCLI command with the latest plugin
   version and latest WordPress version:
 * `Callable ["WP_Rest_Cache_Plugin\\Includes\\CLI\\Flush_Command","__construct"]
   does not exist, and cannot be registered as "wp wp-rest-cache flush"`
 * Not sure why it doesn’t exist as I can see your `Flush_Command` class extends`
   WP_CLI_Command` which definitely does have `__construct`, maybe it can’t call
   a parent constructor like this…?
 * Cheers,

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

 *  Plugin Author [Richard Korthuis](https://wordpress.org/support/users/rockfire/)
 * (@rockfire)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wpcli-error/#post-16084084)
 * Hi [@dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * Thank you for using our plugin!
 * Although I did not get the same error as you, I did see the WP CLI command didn’t
   work correctly anymore. I fixed that and released a new version of our plugin.
   Could you check if this solves it for you?
 *  Thread Starter [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * (@dominic_ks)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/wpcli-error/#post-16084364)
 * Hey [@rockfire](https://wordpress.org/support/users/rockfire/),
 * Cheers for that, that seems to have done the trick thanks very much.

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

The topic ‘WPCLI Error’ is closed to new replies.

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

 * 2 replies
 * 2 participants
 * Last reply from: [dominic_ks](https://wordpress.org/support/users/dominic_ks/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/wpcli-error/#post-16084364)
 * Status: resolved