Posted April 7Apr 7 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
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 accountSign in
Already have an account? Sign in here.
Sign In Now