After my recent migration away from MediaTemple, I noticed my blog wasn’t as fast as I expected. As it turned out, WP Super Cache was broken by the transfer. It relies on absolute paths being set in the PHP scripts.
This is simple to fix but not so simple to detect. It displays no errors. There is no indication to determine if this has happened unless you view the source of a page that should be cached. Towards the bottom will be an error.
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
The solution is simply to edit that file with the correct, updated paths. It should look something like this:
<?php
# WP SUPER CACHE 0.8.9.1
function wpcache_broken_message() {
if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
echo "<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->";
}
if ( !include_once( '/nfs/c02/h03/mnt/30738/domains/blog.dillona.com/html/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
if ( !@is_file( '/nfs/c02/h03/mnt/30738/domains/blog.dillona.com/html/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) )
register_shutdown_function( 'wpcache_broken_message' );
}
?>
Once the paths are updated to their correct values, WP Super Cache may be turned back on via its settings page.