You are reading Upgraded to WordPress 2.1 and WP-Cache 2.1. You can leave a comment or trackback this post.
Posted on February 4th, 2007 by Reiner.
Categories: English, at Home.
The upgrade was quite painless but still took me 2 houres to complete, because I erroneously deleted some files which appear not to be properly documented. I chose to remove all of my old plugins but forgot to delete the wp-content/advanced-cache.php. This file ist is part of the WP-Cache plugin and it must be removed, when deleting the WP-Cache plugin, just disabling WP-Cache will still cause advanced-cache.php to refer (then no longer existing) files.
Besides this tiny glitch, my upgrade to WordPress 2.1 worked like a charm and WP 2.1 appears to be much faster than its predecessor, about twice as fast as WP 2.0.
My WP is running on a dedicated, albeit very slow PC. Thus I still wanted to regain the dramatic speed improvements provided by WP-Cache. Fortunately, the brand-new WP-Cache 2.1 became available last week. This version is required, as prior versions do not work with WP 2.1.
Installing WP-Cache was very easy, with one noteworthy exception: With Linux, wp-content/advanced-cache.php is created as symbolic link that points to wp-content/plugins/wp-cache/wp-cache-phase1.php.
I’m running Windows XP, which does not provide symbolic links. The suggested work-around is to copy the wp-cache-phase1.php to advanced-cache.php (if you update your WP-Cache plugin, you would have to copy it again in order to stay in sync).
However, the main WP-Cache code contained within wp-content/plugins/wp-cache/wp-cache.php checks that wp-content/advanced-cache.php indeed is a symbolic link that points to wp-content/plugins/wp-cache/wp-cache-phase1.php. Thus WP-Cache will silently fail under Windows, its plugin options page just displaying the headlines WP-Cache Manager and Main Options, but nothing else at all.
Again, the work-around is quite simple: After having copied the WP-Cache files as instructed and before activating the WP-Cache plugin, first make sure that you have copied the wp-content/plugins/wp-cache/wp-cache-phase1.php to wp-content/advanced-cache.php. Then edit the wp-content/plugins/wp-cache/wp-cache.php so that it will no longer check for the symbolic link, but will always return true instead . I did this by turning the code into a comment, just leaving the return true in place.
function wp_cache_check_link() {
/*
global $wp_cache_link, $wp_cache_file;
if ( basename(@readlink($wp_cache_link)) != basename($wp_cache_file)) {
@unlink($wp_cache_link);
if (!@symlink ($wp_cache_file, $wp_cache_link)) {
echo “<code>advanced-cache.php</code> link does not exist<br />”;
echo “Create it by executing: <br /><code>ln -s $wp_cache_file $wp_cache_link</code><br/> in your server<br />”;
return false;
}
}
*/
return true;
}
Removing all lines between the opening brace and the return true; works just as well.
P.S.: Life can be so amazing. After having posted this page (you’re looking at right now), I learnt that WP-Cache would properly cache all and everything it is supposed to - just except for this particular page. Why? Because its URL contains the string wp-, which is rejected by WP-Cache for good reasons. Hacking wp_cache_is_rejected (contained within wp-cache-phase2.php) was able to fix this interesting non-bug.
0 comments.
Comments can contain some xhtml. Names and emails are required (emails aren't displayed), url's are optional.