Title: Empty cache from WP-CLI
Last modified: October 18, 2019

---

# Empty cache from WP-CLI

 *  Resolved [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/)
 * Hi, I would like to add cache clearing to our deployment process, what command
   would you call to clear the cache with WP-CLI ?
 * Kind regards,
    Pierre

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

 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8468122)
 * I did not implement it. If you want, we can add it together.
 *  Thread Starter [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8472772)
 * Hi, thanks for the answer.
 * Ok, I saw in some of your previous releases that you made the plugin WP-CLI compatible…
   
   I’m a developer so ok I can help you create the feature. Do you have a github
   repo for the free version of the plugin?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8473270)
 * I just added the following lines.
 *     ```
       if(defined('WP_CLI')){
       	$_SERVER["SERVER_NAME"] = isset($_SERVER["SERVER_NAME"]) ? $_SERVER["SERVER_NAME"] : "";
               $_SERVER["SERVER_PORT"] = isset($_SERVER["SERVER_PORT"]) ? $_SERVER["SERVER_PORT"] : 80;
       			}
       ```
   
 *  Thread Starter [Pierre](https://wordpress.org/support/users/ierpe/)
 * (@ierpe)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8480684)
 * Sorry I don’t follow you here, what do you mean with these lines?
 *  Plugin Author [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * (@emrevona)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8480883)
 * I mean that there was a problem with server name and server port. I just fixed
   this issue.

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

The topic ‘Empty cache from WP-CLI’ is closed to new replies.

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

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [Emre Vona](https://wordpress.org/support/users/emrevona/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/empty-cache-from-wp-cli/#post-8480883)
 * Status: resolved