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:

  1. I logged into my webserver on a terminal and cd into the directory which holds the WordPRess installation directory of my blog
  2. 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
  3. Next wa unpacking this archive with the command tar xvfz 2007-09-25-21-07-45-full.tar.gz wordpress_backup
  4. Renamed the scrambled wordpress installation: mv wordpress wordpress_failed_upgrade
  5. 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:

  1. Fire up your ftp client and open a connection to your webserver.
  2. 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
  3. Rename your current wordpress directory to wordpress_failed_upgrade
  4. Rename your wordpress_recover directory to wordpress or whatever the name of this directory is.
  5. 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 This

Leave a Reply

For support questions, bug reports and troubleshooting regarding plugins from this site, please visit the forum.

See also:

Plugins in action: Mini-Slides

Turakraft uses Mini-Slides.

Plugins in action: Mini-Slides on timbuktoons.tv

Timbuktoons uses the Mini-Slides plugin.

This time it's Facebook

As being advised I did my Facebook page today ;)

Plugins in action: Find Us

KGALEWOOD, the Botswana Travel Community Podcast Channel uses Find Us.

Close
E-mail It