Title: Programatically force cache purge
Last modified: May 21, 2025

---

# Programatically force cache purge

 *  Resolved [nxmndr](https://wordpress.org/support/users/nxmndr/)
 * (@nxmndr)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/programatically-force-cache-purge/)
 * Hello, sorry to bother you again ! We are in the process of trying SP for several
   websites, so we hope you like this kind of feedback.
 * We are using [MainWP](https://mainwp.com) to upgrade our WP extensions. It appears
   the SP cache is not purged when plugins are upgraded, which leads to eg. 404 
   requests on JS and CSS files that do not match the plugins file structure anymore.
   We tried with manual update from the website plugins page with the same result.
 * If it is purged, could it be that it is asynchronous ?
 * Is there a way to trigger a SP cache purge programatically (from PHP) and synchronously,
   so we can link it to the upgrader_process_complete hook, to help with diagnostic?
 * In more general matters, I can tell you that we obtain very good performance 
   so far. This plugin, if it works well for our various websites, will be very 
   useful to counter the load caused by those nasty AI botnets.
 * Thanks again.

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

 *  Plugin Author [Justin Frydman](https://wordpress.org/support/users/defunctlife/)
 * (@defunctlife)
 * [1 year ago](https://wordpress.org/support/topic/programatically-force-cache-purge/#post-18480954)
 * Hi [@nxmndr](https://wordpress.org/support/users/nxmndr/) ,
 * Sorry for the late response. We definitely appreciate this kind of feedback.
 * Currently, we are not purging when plugins are updated, but we do think we should
   be and we are planning on implementing this feature in the next version.
 * Ideally, any time something could change the front-end output or assets, a cache
   purge should be happening.
   In the meantime, you can call this action to force
   a full cache purge, assuming Solid Performance is active and loaded:
 * `do_action( 'solidwp/performance/purge/all' );`
 * Thanks!
 *  Thread Starter [nxmndr](https://wordpress.org/support/users/nxmndr/)
 * (@nxmndr)
 * [1 year ago](https://wordpress.org/support/topic/programatically-force-cache-purge/#post-18483627)
 * Great, thanks. We will deploy this incrementally with the plugin.

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

The topic ‘Programatically force cache purge’ is closed to new replies.

 * ![](https://ps.w.org/solid-performance/assets/icon.svg?rev=3529349)
 * [Solid Performance – Your No-Code Caching, Performance, & Page Speed Solution](https://wordpress.org/plugins/solid-performance/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/solid-performance/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/solid-performance/)
 * [Active Topics](https://wordpress.org/support/plugin/solid-performance/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/solid-performance/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/solid-performance/reviews/)

## Tags

 * [upgrade](https://wordpress.org/support/topic-tag/upgrade/)

 * 2 replies
 * 2 participants
 * Last reply from: [nxmndr](https://wordpress.org/support/users/nxmndr/)
 * Last activity: [1 year ago](https://wordpress.org/support/topic/programatically-force-cache-purge/#post-18483627)
 * Status: resolved