Jump to content

Featured Replies

Posted
comment_908

Quick tip :

One line command to clear wp-rocket cache on all sites on server :

test it first (dry run) :

find /home -type d -name "wp-rocket" | while read -r dir; do cache_dir=$(dirname "$dir")/cache/wp-rocket; [ -d "$cache_dir" ] || cache_dir=$(dirname "$(dirname "$dir")")/cache/wp-rocket; [ -d "$cache_dir" ] && echo "Clearing cache in $cache_dir" || echo "Cache directory not found in $dir"; done


 

run it live (clear the cache files )  :
 

find /home -type d -name "wp-rocket" | while read -r dir; do cache_dir=$(dirname "$dir")/cache/wp-rocket; [ -d "$cache_dir" ] || cache_dir=$(dirname "$(dirname "$dir")")/cache/wp-rocket; [ -d "$cache_dir" ] && echo "Clearing cache in $cache_dir" && rm -rf "$cache_dir"/* || echo "Cache directory not found in $dir"; done

 

  • Sandeep B. changed the title to Bulk clear Wp-rocket cache on your server for all accounts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Posts