Title: Clear Cache using CLI
Last modified: August 24, 2016

---

# Clear Cache using CLI

 *  [YoFLA](https://wordpress.org/support/users/yofla/)
 * (@yofla)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-using-cli/)
 * Is it safe to delete the wordpress/wp-content/cache/* folder using a bash script
   to clear the caches?
 * Thanks!
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [QXARE](https://wordpress.org/support/users/qxare/)
 * (@qxare)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-using-cli/#post-6179861)
 * There shouldn’t be a problem at all (if you only use file based caching), but
   what about the “Garbage collection interval” option under “Advanced” in “Page
   Cache”?
 * > If caching to disk, specify how frequently expired cache data is removed. For
   > busy sites, a lower value is best.
 *  Thread Starter [YoFLA](https://wordpress.org/support/users/yofla/)
 * (@yofla)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-using-cli/#post-6179888)
 * My usage case is that the site is developed/maintained on a dev server & then
   synced to the live server using a command line script. I was just wondering if
   I can simply add a command to remove the cache files.
    Thanks for your answer!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Clear Cache using CLI’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [bash](https://wordpress.org/support/topic-tag/bash/)
 * [cli](https://wordpress.org/support/topic-tag/cli/)
 * [W3TC](https://wordpress.org/support/topic-tag/w3tc/)

 * 2 replies
 * 2 participants
 * Last reply from: [YoFLA](https://wordpress.org/support/users/yofla/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/clear-cache-using-cli/#post-6179888)
 * Status: not resolved