WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to simplify my deploy process and am making use of the Capistrano tool. Is there a way to have capistrano flush W3TC's cache in a deploy task?

share|improve this question

closed as off-topic by birgire, Pieter Goosen, Mark Kaplun, Rarst Aug 25 '14 at 16:08

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

As @andreascreten, wp-cli will do the job for you.

wp-cli includes commands for W3TC (located in the src/php/wp-cli/commands/community/total-cache.php file), so you can flush the cache by running:

$ wp total-cache flush <type>

Where <type> is one of 'db', 'minify', 'object', 'page' or 'post'.

(Note: If you use 'post', you'll need to pass in --post_id= or --permalink= as well)

share|improve this answer

You could use wp-cli to flush W3TC: https://github.com/wp-cli/wp-cli.

share|improve this answer
1  
Can you provide a better explanation here instead of just a link? – Brian Fegter Aug 29 '12 at 1:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.