How to Backup and Restore Your WordPress Blog

by Stefan on 23 August 2009

Mankind is a peculiar animal who never seems to learn from his mistakes. Even though I’m sure most of you have lost valuable files or photos during the years I’m sure just a fraction of you backup your computer.

The simply truth to why we don’t backup up our beloved things is that it takes time. Who want to spend one hour every week  making a backup of their files when you haven’t lost something for several years?

Because of this it’s important to set up a scheduled backup. For the files on your computer you can use a network hard drive and a software to transfer all of the files once a week, but how can you backup your WordPress blog?

How to Automatically Backup WordPress

When scheduling a backup of your WordPress blog you need to backup two things. Your database with all your posts and the files with all your images.

Because of this we need to use two different tools. One plugin for WordPress named WP-DB Backup and a software for Windows named SyncBack.

Database

Follow these instructions step by step to make a scheduled backup.

  1. Download and activate WP-DB Backup from WordPress.
  2. Go to tools –> Backup. Here you’ll see a lot of different checkboxes, but scroll down to the bottom where you have Scheduled Backup.
  3. Fill in how often you want to make a scheduled backup and which tables to include. Personally I prefer to make one every week or daily, but it’s up to how you depending on how often you make a new post.
  4. Enter your mail and press Schedule backup.

I’ve also created an account on Google Mail to archive every backup i create.

Files

Now we have a scheduled backup for all of your posts and comments, but what about your images and themes? Since WordPress doesn’t support this service we need to use a third part software and for Windows I’ve found that SyncBack works great. Any recommendations for Mac?

Before doing this I recommend you to take a manual backup of your files since a small mistake could cause you to lose all of your files.

  1. Download and install SyncBack.
  2. Create a new profile and choose backup as type.
  3. Name it whatever you want.
  4. Press Expert and go to the FTP tab.
  5. Check The destination is on a FTP server.
  6. Enter your FTP details and press Test FTP Settings.
  7. Click on the folder next to Destination in your upper right hand corner.
  8. Click Yes and browse to the directory you want to backup, then hit OK.
  9. Now you do the same thing with Source and choose where to backup.
  10. Go to the Advanced tab.
  11. Under What to do if the same file had been changed in the source & destination? you select Destination overwrites source always (restore).
  12. Under What to do if a file is in the source but not in the destination? you select Delete file from source.
  13. Under What to do if a file is in the destination but not in the source? you select Copy file to source.
  14. Go to the Background tab.
  15. Select how often you want a backup of your files.

As you can see above there are some settings you need to change when using SyncBack. This is because the software are built to work the other way around and send your backup to a FTP instead of getting it from one.

Remember to do a manual backup of your files with your regular FTP software before setting this up since it could cause you to lose all of your files if you use the wrong settings.

How to Restore WordPress

For some reason you’ve lost all of your posts or files and now need to restore WordPress. Thanks to our previous backup this is piece a cake.

To restore your database you need to use phpMyAdmin, a software used to manipulate a database through a web interface. If your host doesn’t have this i highly recommend you to change WordPress hosting.

  1. Upload your files with a FTP software.
  2. Login to phpMyAdmin.
  3. Click Databases and select the database you will be importing to.
  4. Click the Import tab in the top of your screen.
  5. Click on the Browse button and select your latest backup from the mail.
  6. Click the Go button.
  7. Go have some fun while waiting.

Depending on how many posts, comments and categories you have this may take a while but the whole process should help itself.

If you receive an error, feel free to contact me for advice.

Related posts:

  1. How to Automatically Back Up Your Computer
  2. Import and Export WordPress Thesis Settings
  3. How to Install WordPress on Hostgator
  4. How to Make Money With Google Custom Search
  5. How to Hide Affiliate Links

{ 22 comments… read them below or add one }

1 Doug Dillard 24 August 2009 at 02:16

Stefan… GREAT POST. I have been using the DB Backup for quite some time, but never tried SyncBack. I am going to check that out right now. Thanks for the great tip!

Reply

2 Stefan 24 August 2009 at 03:22

Thank you Doug, I’m glad to hear you liked it. Just remember to make a manual backup of your files before trying SyncBack on your blog.

Reply

3 Walter 24 August 2009 at 02:58

Some webmaster forget this important task. Thanks for reminding me on this one. :-)

Reply

4 Stefan 24 August 2009 at 03:23

You’re welcome. Since this only takes a few minutes I recommend you to set it up as soon as possible tomorrow. If not, there’s a chance you will procrastinate.

Reply

5 EC 24 August 2009 at 06:18

Thanks for the reminder. Backing up your database is not fun but it’s better to spend an hour each week (at leas) than cry later.

Very nice post, I’ll try to use db backup again. I had some issues in the past.

Reply

6 Stefan 24 August 2009 at 16:04

I agree with you EC. Even though it may take some time and be boring, in the end it saves you several restless nights and your hair.

Reply

7 George Serradinho 24 August 2009 at 08:10

Wow, I use the plugin you mentioned for the database and I normally ask my hosting company to create a backup of my site’s files and then download them to my PC.

I will see how SyncBack works and maybe try that out, thanks for sharing this.

Reply

8 Stefan 24 August 2009 at 14:30

I’m glad to hear George. You’re welcome back to share your thoughts after testing it.

Reply

9 Luis Lopez 24 August 2009 at 08:54

Excellent tip the Syncback because I have DBpackup to daily send my my information, but is true that they only save the Database not the images or other files.

I’ll try it.

Reply

10 Stefan 24 August 2009 at 16:09

Thank you Luis. Even though your content is the most important part of your blog I still think images creates the atmosphere so I wouldn’t want to be without them.

Reply

11 Christie 24 August 2009 at 13:54

I had always wondered “am I doing enough” as far as backup. I am NOT doing enough. I have the database backup scheduled with the plugin but was only backing up the files manually once every month or so! I’ll get SyncBack right away. Thanks for the great post!

Reply

12 Stefan 24 August 2009 at 14:54

You’re welcome Christie. I hope you find it useful.

Reply

13 jason 24 August 2009 at 15:20

This is useful. I will have to bookmark this page.

Thanks for this.

Reply

14 Atul 24 August 2009 at 16:23

I m using the sam eplugin and deffered its delivery daily to mine mailId.its great plugin

Reply

15 Surender Sharma 24 August 2009 at 19:12

Hi Stepfan Thanks for nice tip.
I am using the plugin for DB backup daily.

Reply

16 Asswass 24 August 2009 at 22:24

I also use the DB backup plugin but thank God that I’ve never had to use it.

Reply

17 mostlyBlog 25 August 2009 at 06:42

hey thanks for remind me because i am recently move to wordpress self host blog but i didn’t start backup, i think now i have to backup every week

Reply

18 Stefan 25 August 2009 at 13:35

You’re welcome. I recently mentioned how I lost Google AdSense Generator because of lack of backup. It took me some hours to create it all over again, which I wouldn’t had to do if I only had a backup.

Reply

19 Sunil Jain 26 August 2009 at 05:43

Thanks :)
it would help me while switching my hosts :)
Cheers :)

Reply

20 Ching Ya 27 August 2009 at 05:45

Well, Stefan, I certainly won’t want to learn this the hard way. ^^ Thanks so much for providing the step-by-step how to’s. I’m amazed no one is stumbling this post yet so I did. A great tutorial for me as a WP newbie, surely for others too. Going to get my WP blog secured.

@wchingya
Social/Blogging Tracker

Reply

21 Stefan 27 August 2009 at 11:12

Thank you Ching. I wish more people would stumble each others articles on StumbleUpon since it’s a great method to get visitors within your niche.

Reply

22 dinu 27 August 2009 at 19:58

sounds cool :)

backup regularly .. and backup efficiently

Reply

Leave a Comment


Previous post:

Next post: