Migrating your ZipWp site to a new host may bring about challenges, potentially resulting in site breakages. Furthermore, tweaking a post may disrupt CSS, affecting the display on mobile or desktop devices. Similarly, regenerating site assets might occasionally cause the site to appear broken for your website users.
These issues commonly arise in environments with caching mechanisms like Varnish in Cloudways, file-based caching in SiteGround or something similar.
Typically, when changes are made to a page or the entire site, you should purge the cache to ensure the latest resources are served. Problems arise when the caching environment retains old resource URLs that are no longer available.
To streamline this process using Spectra actions, we’ve implemented internal hooks that allow purge functions to be seamlessly integrated.
This automation ensures that you can maintain an up-to-date and consistent experience by automatically purging outdated cache when changes are made.
We are trying to provide compatibility from our side for some of the known hosts.
Recently we have provided support for Siteground’s – Speed Optimizer plugin. And will be adding support for more hosts/plugins further.
In the meanwhile, you can add this code in your environment using some code snippet plugin like Code Snippets – WordPress plugin.
add_action( 'uagb_delete_uag_asset_dir', 'clear_cache' );
add_action( 'uagb_delete_page_assets', 'clear_cache' );
function clear_cache(){
// purge_cache_function(); Call cache function in your environment
}