Title: Patch for wp-cli command
Last modified: August 20, 2016

---

# Patch for wp-cli command

 *  Resolved [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/)
 * Here’s a [patch](https://raw.github.com/gist/3a8d73cec7a163be0c30/98982f5c967ddd8b818d7776a03506809a254018/w3-total-cache.diff)
   that implements a [wp-cli](http://wp-cli.org) command, with which you can flush
   various caches from the command line.
 * Example usage:
 *     ```
       $ wp total-cache flush db
       ```
   
 * [http://wordpress.org/extend/plugins/w3-total-cache/](http://wordpress.org/extend/plugins/w3-total-cache/)

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

 *  Plugin Contributor [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/#post-3238226)
 * Thanks! Took a look at this patch. As one might expect after the [announcement](http://madewithlove.be/abob/2012/09/happy-birthday-wp-cli/),
   there a number of commands that are supported in the private master or the next
   public release expected this month, e.g.:
 * flush db
    flush database flush minify flush object flush post <id> flush post
   <permalink> flush post querystring (updates the mediasquerystring) cdn_purge 
   <array> (consists of paths relative to wphome url) pgcache_cleanup
 * More will be added soon.
 *  Thread Starter [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/#post-3238227)
 * I had read about that, but forgot about it in the mean time. Disregard my patch
   then.
 * Looking forward to the next release.
 *  Plugin Contributor [Frederick Townes](https://wordpress.org/support/users/fredericktownes/)
 * (@fredericktownes)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/#post-3238228)
 * No worries. 🙂
 *  Thread Starter [scribu](https://wordpress.org/support/users/scribu/)
 * (@scribu)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/#post-3238232)
 * For legal reasons, I have to mention that most of the code in the patch was actually
   written by [andreascreten](https://github.com/andreascreten/), with help from
   [johnpbloch](https://github.com/johnpbloch).

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

The topic ‘Patch for wp-cli command’ 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/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [scribu](https://wordpress.org/support/users/scribu/)
 * Last activity: [13 years, 5 months ago](https://wordpress.org/support/topic/patch-for-wp-cli-command/#post-3238232)
 * Status: resolved