Fixing Wordpress WP-Cache Errors When Moving your Blog
Monday, October 30, 2006
I recently migrated this site from Dreamhost over to MediaTemple, which was one of the simplest migrations I’ve done… upload the database file, copy over the contents of my web directory, update wp-config.php… and everything works!
Well, nearly. I still had this error message when I browsed to my site:
Warning: main(/johnnysthoughts.com/wp-content/advanced-cache.php) [function.main]: failed to open stream: No such file or directory in /johnnysthoughts.com/wp-settings.php on line 69
I’m using the WP-Cache module to make sure that the site runs as fast as possible. Because of the way the module works, you can’t just copy the site over. The problem lies in the symbolic link from SITE_ROOT/wp-content/advanced-cache.php to the actual plugin file in the plugins directory.
So, open up your SSH connection and navigate to your site root, and run these commands.
cd wp-content
rm advanced-cache.php
rm cache/*
chmod 775 cache
ln -s plugins/wp-cache/wp-cache-phase1.php advanced-cache.php
This will delete the bad symlink file, clear the cache, set the permissions on the folder and then create a new symlink to the wp-cache-phase1.php file.
October 30th, 2006 at 3:31 pm
This is a life-saver. The error messages one gets are unpleasant and so unhelpful. Thanks for this!
December 19th, 2006 at 7:19 am
This worked perfectly! My host server crashed a few hours ago, which means they had to restore from backup. My site would not load because of this plugin. I thought I would have to disable it and research for a fix. Thanks to this post, I’ve saved so much time.
March 8th, 2007 at 9:06 am
Well this hosed my website, wordpress was rendered useless, no themese, plugins and what not. cant even get into wp-cache.
March 8th, 2007 at 11:48 am
Thank you for the support e-mail everything is perfect now. It was my screw up on this one.
In case others run into an issue.
1. Create the symbolic link and make sure that it has the correct permisions (777)
2. Make sure wp-content has 777
3. Make sure wp-content/cache/ has 777
4. Make sure wp-content/plugins/wp-cache has 777
5. Make sure the symbolic link /wp-content/advanced-cache.php has 777
6. Add define(’WP_CACHE’, true); in wp-config.php, located in the blog root
check those
April 29th, 2008 at 2:09 pm
Thanks so much… this was so helpful.