Title: cli flush post not working
Last modified: January 23, 2024

---

# cli flush post not working

 *  Resolved [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/)
 * I’m trying to use cli to flush the homepage cache to refresh a widget. The homepage
   has post id of 6, the following command is not refreshing the page.
 * wp w3-total-cache flush post –post_id=6
 * (its a double dash in front of post_id, response is “Success…”)
 * What am I missing? If I use the purge link from Posts section it does it correctly,
   but not when I try to do it via cli.
 * Plugin version 2.6.1
    -  This topic was modified 2 years, 3 months ago by [jetcrusher](https://wordpress.org/support/users/jetcrusher/).

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

 *  Thread Starter [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17367504)
 * I also tried (homepage is what I’m attempting to purge)
 * wp w3-total-cache flush post –permalink=/
 * Response: “Success: The page is flushed from cache successfully.”
 * same issue, nothing is purged. The page is not updated and response headers still
   show old date for last-modified.
    -  This reply was modified 2 years, 3 months ago by [jetcrusher](https://wordpress.org/support/users/jetcrusher/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17369034)
 * Hello [@jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * Thank you for reaching out and I am happy to help!
   Can you please share the website
   URL?Have you tried wp w3-total-cache flush all and see if the cache is cleard?
 * Thanks!
 *  Thread Starter [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17369993)
 * “wp w3-total-cache flush all”
 * Does nothing, the response is success but nothing is cleared. The only way I 
   can clear cache is from the WP Admin side, cli commands have no effect.
 *  Thread Starter [jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * (@jetcrusher)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17370025)
 * A bit more debugging, under wp-content/cache/page_enhanced/domain.com
 * If I use the admin side purge cache the _index_slash_ssl.html file gets renamed
   to _index_slash_ssl.html_old until the home page is loaded again and a new _index_slash_ssl.
   html is created.
 * This does not happen when using cli command.
 * I can delete the cache files directly but its a hacky way to do this.
    -  This reply was modified 2 years, 3 months ago by [jetcrusher](https://wordpress.org/support/users/jetcrusher/).
    -  This reply was modified 2 years, 3 months ago by [jetcrusher](https://wordpress.org/support/users/jetcrusher/).
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17372692)
 * Hello [@jetcrusher](https://wordpress.org/support/users/jetcrusher/)
 * I’ve tested this and the cli flushing works as expected.
   Can you please share
   the website URL? Can you please also confirm that you are calling those commands
   in the correct place?
 * Thanks!

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

The topic ‘cli flush post not working’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/cli-flush-post-not-working/#post-17372692)
 * Status: resolved