Skip to content

Instantly share code, notes, and snippets.

@onwp
Created October 11, 2023 07:07
Show Gist options
  • Save onwp/a347aa418cf7f326b94cc5a0bcab67f3 to your computer and use it in GitHub Desktop.
Save onwp/a347aa418cf7f326b94cc5a0bcab67f3 to your computer and use it in GitHub Desktop.
WP cli clear cache commands
#Flush the object cache using this WP-CLI command.
wp cache flush
#Beaver Builder plugin and Beaver Theme have these WP-CLI commands.
wp beaver clearcache
wp beaver theme clearcache
wp beaver clearcache --all
#Autoptimize plugin has this WP-CLI command.
wp autoptimize clear
#Cache Enabler plugin has this WP-CLI command.
wp cache-enabler clear
#Elementor plugin has this WP-CLI command.
wp elementor flush_css
#WP Fastest Cache plugin has these WP-CLI commands.
wp fastest-cache clear all
wp fastest-cache clear all and minified
#Swift Performance plugin has this WP-CLI command.
sp_clear_all_cache
#W3 Total Cache plugin has these WP-CLI commands.
w3-total-cache cdn_purge
wp w3-total-cache flush all
#WP Rocket plugin has a community package for WP-CLI support.
https://github.com/GeekPress/wp-rocket-cli
wp rocket clean --confirm
#WP Super Cache plugin has a community package for WP-CLI support.
https://github.com/wp-cli/wp-super-cache-cli
wp super-cache flush
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment