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)
Related Posts:
- Trouble with WordPress local development and deployments
- Difference between w3total cache disk enhanced and disk basic [closed]
- How does W3 Total Cache CDN URL rewrites work? [closed]
- Proper hook for W3TC defines, or dynamically disable w3 total cache [closed]
- Disable WordPress cache programmatically on a request [closed]
- Is W3 Total Cache still useful with CloudFlare? [closed]
- w3 total cache minification breaks wp_localize_script() [closed]
- W3 Total Cache, RackSpace Cloud Files, and Forcing Downloads [closed]
- Page cache for categories not updating with W3 Total Cache [closed]
- Exclude content from w3 total cache [closed]
- Need to create a function that will run regardless of W3TC PageCache for every page request [closed]
- W3 Total Cache active but not working [closed]
- Exclude certain block from caching using Fragment Caching – doesn’t work [closed]
- W3 Total Cache Minify Rewrite Error with WordPress on nginx [closed]
- How to cache custom pages using W3 Total Cache? [closed]
- Lighttpd, WordPress Caching plugin [closed]
- Showing as logged in after logout (W3 Total Cache issue) [closed]
- WP-e-Commerce and W3-Total-Cache integration problem [closed]
- How to exclude a specific template from being cached by a CDN [closed]
- How do I get W3 Total Cache not to cache sidebars? [closed]
- Programmatically disable W3 Total Cache in development environment [closed]
- How can I use fragment caching to exclude certain plugins from being cached?
- How can I get W3 Total Cache to recognise Amazon ElastiCache? [closed]
- w3 Total Cache expire headers not set [closed]
- Transient API and caching Plugins
- How to handle is_user_logged_in() with w3 total cache [closed]
- How to hide W3 Total Cache from non admins?
- W3 Total Cache – Converting Apache rewrites to Nginx [closed]
- Where is New Relic API key? [closed]
- Intercepting Before W3 Total Cache [closed]
- WordPress Leverage browser caching Show how to fix & Eliminate render-blocking JavaScript and CSS in above-the-fold content Show how to fix
- W3Total Cache problem with Nginx [closed]
- Enabling Cache on WP Membership Sites. Good OR Bad?
- Getting “Internal Server Error” when enabling ‘Set expires header’ in W3 Total Cache [closed]
- Remove “?repeat=w3tc” from any url
- How we stop caching of particular div when i am using w3 total cache plugin? [closed]
- How can I output HTML in a template without it being passed through a caching filter? [closed]
- Split Testing with W3 Cache Enabled? [closed]
- Exclude Random Redirect from caching?
- W3 Total Cache Minify + cforms II = POST /wp-content/plugins/cforms/lib_ajax.php 500 (Internal Server Error) [closed]
- Memory consumption in w3-total-cache vs wp-super-cache? [closed]
- How do I create a link in the WP admin bar that purges all caches (W3 Total Cache)?
- W3 Total Cache Error: some files appear to be missing or out of place. Please re-install plugin or remove
- Browser detection booleans mess. Caché plugin?
- Pre-Caching and Googlebot
- When using W3 Total Cache should I remove my enqueues from functions.php [closed]
- WordPress cache login issue (w3 total cache) [closed]
- W3 Total Cache + S3 + Cloudfront. [closed]
- W3 Total Cache Minification – Any way to not use php? [closed]
- W3 Total Cache benefits without using plugin? [closed]
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- Can not deserialize instance of java.lang.String out of START_OBJECT token
- error: This is probably not a problem with npm. There is likely additional logging output above
- Causes of getting a java.lang.VerifyError
- Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)
- Understanding Heroku server status 143
- Invalid initial heap size. Could not create the Java virtual machine
- Why should define(‘RELOCATE’,true) be removed from wordpress config?
- How to: Easily Move a WordPress Install from Development to Production?
- Is Git/GitHub a good WordPress deployment solution?
- Dev, Stage and Production Deployment for WordPress Sites?
- W3 total cache – cache refresh programmatically [closed]
- WordPress and Git Workflow
- Is this Solution for Caches vs Cookies Going to Get Me in Trouble?
- Best way to show Dynamic Content on a Cached WordPress Site?
- W3 Total Cache, CDN and theme files [closed]
- Is there a drush equivalent for WordPress yet?
- Pros and Cons for high “expire time” on wp-super-cache or w3-total-cache? [closed]
- Limit cache size from W3 Total Cache [closed]
- Deployment strategies for WP-Supercache [closed]
- Trouble with Transient API when W3TC is activated [closed]
- W3 Leverage browser caching not working for google pagespeed [closed]
- How can I sync WordPress plugin settings between environments?
- How to stop wordpress from changing default .htaccess permissions to 444
- Clear cache when a post is submitted [closed]
- Git Deploying – Disabling plugin/theme installation/update on remote?
- Change site url when moving site to another url?
- How to transfer a WordPress blog to a different domain?
- Should I use Transients with W3 Total Cache APC Caching? [closed]
- Best way to develop multisite and deploy on another server?
- Is it possible to disable caching of an option when using w3 total cache?
- WordPress Browser Cache with W3-Total-Cache doesn’t show new posts [closed]
- Correct Search & Replace Queries for Changing URLs in a WordPress Database?
- AJAX vs Fragment Caching for W3 Total Cache [closed]
- Combine JS and CSS for WordPress admin
- strange characters in wordpress website displayed for visitors [closed]
- How can you develop on a live WordPress installation that is using W3 Total Cache? [closed]
- Managing updates when WordPress is in your own svn repo
- security+best practices: root or www-data on a wordpress content folder?
- Make W3 Total Cache “Empty All Caches” function purge varnish [closed]
- Writing a view count with w3 total cache
- Varnish + W3 Total Page Cache [closed]
- Can’t get rid of minify after uninstalling W3 Total Cache [closed]
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- WordPress Workflow – version control, deployment = database issue
- Run W3 Total Cache Flush Function with Crontab [closed]
- W3 Total Cache doesn’t detect memcached [closed]
- W3 Cache plugin and Facebook sharing [closed]
- Settings to get the most out of W3 Total Cache
- How to force content refresh of a page that has been loaded previously by the user? [closed]