Backing Up Your WordPress Blog

Update 21 May 2012:

This article has been updated with a newer one covering WordPress backups in more detail. You can find the newer article here.

Original article starts here:

Here’s a question I saw today: can someone explain how to back up my WordPress blog?

Backing up your blog is an essential housekeeping task that you should do at least once a week.

If you’re a hyper blogger (2, 3 or more posts a day) then you’d probably want to back up your database each day, although you could probably leave your system files to be backed up on a weekly schedule.

So here’s how to back up your blog:    

The first thing to appreciate is that your blog is broadly split into two sets of files and they both need to be properly managed:

  1. Your WordPress files (or system files). These are the files that deliver the functionality of your blog
  2. Your Database files.  These are the files that contain your content – your posts and comments.

The database is where all your hard work has gone.  If you don’t have backups of your database and you lose it, you’ve lost all your work.  You’d have an empty blog.

The system files are easy enough to restore if they get corrupted: you can just install another copy of WordPress, adjust the database parameters in your config.php file and you’re all set.

Having said that, you’d still have to reconfigure all your settings, re-install your plugins, re-update them and so forth, so it’s going to be a pain.

But not the disaster that losing all your content would be.

I publish 2, sometimes 3 articles a week so I back up both my database and my system files once a week.

I also keep the original copies of the articles I publish so if I did lose those 2 or 3 articles I’d just have to re-post them – no big deal for 2 or 3 articles.

Back Up Your Database

OK – to take your database first:

There are a number of good plugins for managing your database. The one I use is WP-DBManager, but there are others.

The reason I like WP-DBManager is that, in addition to all the backup functionality that most of the database plugins offer, it also offers me the ability to repair, optimise and restore my database.

Optimising your database is one of the ways of keeping your blog running quickly, so in addition to backing up my database each week I also optimise it each week.

You can find WP-DBManager here.

So install WP-DBManager, activate it and then go to the ‘Database’ item in the menu on the left:

Click the second link, ‘Backup DB’ and the first thing it will do is run some checks to see if everything is configured correctly.

It will highlight any problems, which you may be able to fix in the ‘DB Options’ screen – there are some hints there to follow.

The problems are likely to be related to the paths to your database or backup folders, so if you can’t fix them from the DB Options screen you may have to ask your hosting provider for the answers.  They should be able to give them to you very quickly.

Once everything is set up you can just click the ‘backup database’ button at the bottom and in about 15 seconds you’ll be all done.

By default the back up file will be stored in the backup-db folder which will be inserted into the wp-content folder.

As a security precaution I always move this file from my server to my PC immediately after taking a back up.

If I need to restore my database in the future I just need to copy the latest version from my PC back to the backup-db folder and the plugin will do its thing.

Back Up Your System Files

Backing up your system files is just as simple but, unfortunately, can take up to an hour or more.  Still – you can set it running then go and have some breakfast, which is what I normally do.

To back up your system files you simply need to copy everything in your ‘wordpress’ folder, or ‘blog’ folder, or whichever folder you installed WordPress into, back to your PC.

This means firing up your FTP client, dragging your WordPress root folder and all its contents and dropping it into a back up folder on your PC.

This will retain all your settings and configurations, including your database parameters. If you then need to restore your system files for any reason (for example if a WordPress upgrade bombs out), you can just copy the ‘wordpress’ folder back to your server again.

As I said earlier – copying your system files back to your PC will take up to an hour or more, depending on your connection speed, your FTP client and so on. So set it running and go for a cup of coffee.

How Often and When Should I Back Up?

I back up everything once each week as a matter of course. I also back everything up before making any major changes to the site – e.g. upgrading WordPress.

A good principle to work off is that you can’t back up too often.

I while ago, before WordPress included auto upgrading in the core, I wrote a manual on how to upgrade WordPress manually.  Part of that also included how to back up and restore your database manually.

If you’d be interested in those database management steps let me know – I’ll happily give you a copy for free since the manual itself became obsolete when WordPress introduced auto upgrading.

OK – that’s it – hope it was helpful!

About the author: Martin has been working online since 2006 and focuses on two areas: 1) affiliate marketing and 2) designing and building websites based on WordPress. He has his own WordPress agency, and serves clients in Hong Kong, Australia and the UK.

What do you think?

Comments on this entry are closed.

  • Ralph Jun 30, 2009 @ 9:53

    Every time I turn around there is something else I don’t know. I guess I just assumed that somebody somewhere was saving my stuff.
    .-= Ralph´s last blog post: Diggin’ Persistence =-.

    • WealthyDragon Jun 30, 2009 @ 13:20

      Hi Ralph,

      Wouldn’t that be brilliant..!

      Thanks for dropping and I’m delighted this was useful,



  • Waisybabu Jul 20, 2009 @ 15:42

    I will go ahead and use WP-DB Backup but as for using an FTP client to download my WordPress system files… it takes forever to download them! (I use FireFTP on Firefox)..
    .-= Waisybabu´s last blog ..Funny Video of the Day: Punjaagi Totay T20 World Cup =-.

    • WealthyDragon Jul 20, 2009 @ 16:21

      The most important files to back up are your database files.

      But if you download and install FileZilla I think you’ll find that the download time for your system files improves dramatically over what you must be experiencing by using FTP on FireFox.

      I’ve never used FTP on FireFox but I cannot believe it’s meant for anything more than transferring a few files at a time.



  • Pat155 Jul 21, 2009 @ 22:26

    Thanks Martin for clear instruction on backing up, even a newbie like me can follow. I imagine many like me would be uncomfortable using FTP the first several times.
    What if I transfer the wrong file uuuuuuuuh! 🙂
    .-= Pat155´s last blog ..Hello world! =-.

    • WealthyDragon Jul 22, 2009 @ 7:23

      Hi Kwin,

      As long as you only copy (not ‘move’) the file back to your PC it won’t cause any immediate problems on your site.

      If you tried to restore the wrong file, that would cause a problem, for sure.

      But if you keep it simple by transferring your entire WordPress directory, as I’ve set out above, then the risk of transferring the wrong file is hugely reduced. Restoration is also easy because you can just restore the entire WordPress directory.

      That’s also one of the reasons I make sure that the file and folder structure on my site is exactly the same as the file and folder structure on my PC. That’s another way to ensure you transfer the right files to the right places. 🙂

      It also keeps transfers simple: if you’re in doubt about a file to transfer then transfer the entire folder.



  • Stevie Feb 2, 2010 @ 23:12

    Thanks for pointing out WP-DBManager and the tips around backing up. It looks like a good tool.

    Some things to add which hopefully will help others:

    1. After installing WP-DBManager you might get a big red message within your WP dashboard warning you about a potential security risk with your DB Backup folder. You need to move the htaccess.txt file from the plugin folder to the backup-db folder and rename it as .htaccess to lock it down. (Full info is on the plugin author’s forum)
    2. Once you’ve fixed the above, the warning message might not go away. To get rid of it you need to edit the plugin to remove or comment out the warning. Again, instructions are on the forum. Basically comment out the line add_action(‘admin_notices’, ‘dbmanager_admin_notices’);

    • Martin Feb 3, 2010 @ 7:00

      Stevie, hi,

      Thanks – an important addition to the article!

      I have to admit I didn’t realise that moving and renaming the HTACCESS file may not solve the problem – it always has for me!

      Thanks again,