Apr
09
Picture of a WordPress shirt

A few months ago I showed how to schedule automatic WordPress backups. In that post, I explained how each WordPress blog has two parts that need to be backed up: files and databases. Without both, a WordPress backup is practically useless.

Trust me, I’ve learned that the hard way. Luckily, last week, when doDesign went down, I had both backed up. I went through the restore process myself and thought I’d explain how to do it.

Prepare the Files

Find the backup files on your computer and see when they were last changed. Next, download a backup of your database that was created as close to the time that the files were backuped. In other words, you want to make sure to select the file and database backups that created (around) the same time.

Be careful! You want to restore a backup that once worked.

Restore

The restore process, like the backup, is divided into two parts. First we’ll restore the database.

Database

WordPress has a great tutorial explaining how to restore a database in phpMyAdmin. Here are the steps:

  1. Login to phpMyAdmin.
  2. Click databases, and select the database that you will be importing your data into.
  3. You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.
  4. Across the top of the screen will be a row of tabs. Click the Import tab.
  5. On the next screen will be a Location of Text File box, and next to that a button named Browse.
  6. Click Browse. Locate the backup file stored on your computer.
  7. Make sure the SQL radio button is checked.
  8. Click the Go button.

They also explain how to do it using Mysql commands.

Files

Now you have to upload the files back to your server. You can use an FTP client to do this. I’m not 100% sure, but I think the files have to be restored to their original location. For example, if they were originally at /public_html/wordpress,  you need to restore them to the same place.

Test it Out!

Visit your site and test it out. Does it look familiar? Aren’t you glad that you backed-up? If everything is working, head straight to work and be sure to automate your WordPress backups once again (if necessary).

Leave a Reply