Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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