Rolling Back a WordPress Upgrade

This blog site crashed yesterday night. I tried upgrading WordPress to the latest version and it wouldn’t start because of an old version of PHP. A few weeks ago, I had also tried upgrading and there was a compatibility check which indicated I need a newer version of PHP. Soon after that, my hosting service informed me that they will be updating PHP among others.

So last night, I tried upgrading again and it seem to have passed the compatibility check as there was no error message or anything. Success, I thought. Then I tried accessing the site and was greeted by “”Your server is running PHP version 4.4.9 but WordPress 3.2.1 requires at least 5.2.4.”

Obviously the compatibility check didn’t even run and my hosting service has not yet updated PHP. Looked like I have to roll back. No problem, I thought, since the upgrade procedure made backups of the old WordPress database and files. I used PHPMyAdmin to delete the new database. Then I ran the SQL script to restore the old database. Quick and easy.

Next step is to restore the old files. It was then that Murphy’s Law reared its ugly head. Since I had no real shell access (sucks!), I had to rely on WebShell (yech!) and for some reason I couldn’t copy the backup files. After tinkering around for an hour or so, I eventually called it a night and requested tech support to copy the files.

This morning, I saw that the files have been copied but WordPress needs to be configured. Good thing there’s a quick script for that. Bad things is it’s not working. It seems I didn’t have the right settings. It took me an hour or so of digging around the files in server before I found the proper settings. That done, the site finally started started up.

And then I saw the broken images. Apparently, while tinkering around with WebShell, I had accidentally deleted the old wp-content folder which holds uploads among others. I dug around my files for a backup but couldn’t find any. Giving up, I asked tech support if they have a backup and, if so, to restore it. As luck would have it, they did have a backup and in literally just a matter of minutes, the wp-content folder was restored and the images were fixed.

Whew!