Delete cache via script
-
This is an automatic translation
I am trying to delete the cache with a script, placed in the WP root. Code:
——————————
<?Php require_once("wp-load.php"); include_once('wp-admin/includes/plugin.php'); if ( is_plugin_active( 'w3-total-cache/w3-total-cache.php' ) ) : echo 'Plugin ACTIVE'; // Clear all W3 Total Cache $w3_plugin_totalcache->flush_all(); echo '<div><p>All <strong>W3 Total Cache</strong> caches successfully emptied.</p></div>'; else : echo 'Plugin DEACTIVATE !!!!!!!!!!!!!!'; endif; ?>
——————————
… but I get the error:
Plugin ACTIVE
Fatal error: Call to a member function flush_all() on null in /home/zanclus6/public_html/cr_w3tc_clear_cache.php on line 10Thank you for the help, Claudio_
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Delete cache via script’ is closed to new replies.