W3TC offers some functions to flush caches[1]:

flush_pgcache(); // Page cache
flush_dbcache(); // Database cache
flush_minify(); // Minify cache
flush_all(); // All caches

And you can call it like this:


So, if you need daily purging of all caches you could use schedule recurring cron event for whatever function you want[2]. Here’s an example code you can try. I haven’t had a chance to test it though. Drop it in your theme’s functions.php file. You could create a plugin if you wanted for this too.

// Scheduled Action Hook

function w3_flush_cache( ) {

// Schedule Cron Job Event

function w3tc_cache_flush() {
if ( ! wp_next_scheduled( ‘w3_flush_cache’ ) ) {
wp_schedule_event( current_time( ‘timestamp’ ), ‘daily’, ‘w3_flush_cache’ );

add_action( ‘wp’, ‘w3tc_cache_flush’ );

Hope that helps.


[1] W3 Total Cache plugin integration

[2] Function Reference/wp schedule event

 Viktor Nagornyy