5 Steps to Recover from a failed WordPress Upgrade
September 25th, 2007
About half an hour ago I was very close to screw up my WordPress blog. Finally I managed to recover successfully within 5 minutes, what enables me to share my experience here.
Before I start: check you PHP version! I know I should have had a closer look, but since my blog is running on MySQL 5 I was so sure having PHP 5 as well. Instead I am sitting on a webserver running on PHP 4.4.6, which is really antique.
I followed my own 5 Step Failsafe upgrade for WordPress and upgrade was successful. Offline. When repeating the required steps with my production system, I was presented with a PHP error message: undefined function: stripos().
What a shock! No PHP 5
Now this is what I did to get my blog back to its previous state in 5 minutes:
- I logged into my webserver on a terminal and cd into the directory which holds the WordPRess installation directory of my blog
- I copied the last full backup from the backup repository with cp wordpress/wp-content/backup/2007-09-25-21-07-45-full.tar.gz 2007-09-25-21-07-45-full.tar.gz
- Next wa unpacking this archive with the command tar xvfz 2007-09-25-21-07-45-full.tar.gz wordpress_backup
- Renamed the scrambled wordpress installation: mv wordpress wordpress_failed_upgrade
- Put the backup i place instead: mv wordpress_backup/wordpress_files wordpress
This was it! Pheeeeew!
Whithout shell access these steps would take a bit longer and look like that:
- Fire up your ftp client and open a connection to your webserver.
- Upload the contents of an unpacked offline backup archive into a directory wordpress_recover just on the same level as your actual wordpress installation directory
- Rename your current wordpress directory to wordpress_failed_upgrade
- Rename your wordpress_recover directory to wordpress or whatever the name of this directory is.
- No fifth step required
Question: My WordPress is installed at the root level of my userhome, I can’t create direcories on the same level. Can I just overwrite the files within the directory of the failed upgrade?
Answer: You can. But this is not wise. Your failed upgrade might have left some extra files there which might cause some problems. It is wiser to delete every part of that faulty WordPress installation, and upload your backup onto an empty webspace.
Share ThisPosted by Roland Rust
File under: Wordpress Plugins
See also:
- Find Us in dutch language (January 13th, 2008)
- Plugins in action: Mini-Slides (November 19th, 2007)
- Demo Mode 1.2 released (November 18th, 2007)
- Plugins in action: Mini-Slides on timbuktoons.tv (November 17th, 2007)
- Demo Mode 1.1 released (November 9th, 2007)


Leave a Reply