How to Backup And Restore WordPress Database

backup and restoreCreating a Backup of your WordPress site and to restore it back can be a bit messy. There are plenty of plugins in the WordPress plugins directory which can make your life easier. A lot of web-hosts also provide options inside the C-panel itself to create a backup and restore it. Quite a few days ago, one of my co-bloggers Sachin asked about creating and restoring his wordpress blog. Also, I thought many readers among you would also be facing the same problem. Certainly the answer couldn’t be a one sentence answer, so I decided to publish a complete article on this subject.

Why is Creating a Backup Important ?

Last week my site was offline for about two days, you might have not felt it as I use aggressive caching on my blog. Sticking to the point, the reason my site went offline was my MqSql database tables were corrupted. When I contacted the support they asked me If I had a backup so that they can restore it. Sadly I had no backups, as I wasn’t creating any backups till then.

I asked what would happen if no backup was there. They told I would have to install a fresh wordpress copy, this meant all my posts, pages, images and comments would be lost. At any cost I was not in a state of loosing all the valuable data. I was wondering what was about to happen when the web host told that they found a backup and restore it back. It was such a relief to hear those words. The team also requested me to take regular backups of database so that if I fell into situation like this in future, I could get out easily.

Later the web-host found that it was due to a plugin conflict. Also, they informed that If they had no backup, my site would have surely be ruined. It was something which can happen with any blogger.

So, you can conclude how important is it to create a Backup regularly.

Understanding WordPress Backups

wordpressWordPress is used by a lot of pro-bloggers, its pretty tricky to understand if you aren’t a developer yourself. Basically WordPress hosts its content in two places. First is your FTP directory , this is the place all your files, images, themes and plugins are stored. In most of the cases you won’t need to back this up unless someone hacks your site and wipes everything out. Second is your MySql database , it contains tables where all information such as login details etc are stored. If your database wipes out there is no worth of the Ftp directory. This is why you should backup your database at regular intervals.

How to Backup WordPress Database

To backup a wordpress database you can either use WP database plugin or go with the default mysql method. Don’t worry I have provided steps for both. If you want to avoid mess you can use a plugin or else if you are comfortable with experimenting you can directly backup from MySql itself.

 > Backing up WordPress Database with plugin

1. Download and Install the WP Database plugin. It allows you to take manual backups, schedule backups, download and store it to your computer too.

2. After Installation go to Tools > WP-DB Backup.

create backup

3. Click on Create new Database backup to Create a Backup. After creating a backup, you can Download it to your computer. Right click on Download link and select save link as and save it to your computer. You can also click on the restore database backup to restore it. Also, you can remove additional backups by clicking on Remove database Backup.

> Backing Up WordPress With MySql

1. If you don’t want to install any additional plugin you can also backup your database directly from phpmyadmin. Open PhpMyAdmin and click on Export as shown in snapshot below.

backup mysql

2. In the next page, select your database from the list, scroll down to the page and select save as file, and under it select compressed. And Click on Go.

backup mysql

Restoring the Backup

If you created the backup using the WP database plugin as mentioned in the steps above, you can restore your database simply by clicking on Restore database button. Although it works most of the time but in case your site is offline, you won’t be even able to open your database.

> Restore the Backup from Plugin

You can Either Simply click on Restore Database under tools > WP-DB Backup. But if your site is offline and you aren’t able to open your database. You can download the backups straight from the folder where the plugin stores them.

Go to your FTP directory where wordpress is installed and navigate to /wp-content/uploads/db-backup/

Once you have the Backup file you can restore it to MySql with the steps mentioned below.

> Restore the Backup With PhpMyAdmin

1. Open your PhpMyAdmin and Click on Import, it is just below the export option as shown the snapshot in first step of Backing up with Mysql.

2. In the first box, click on Browse and select the backup collected either from the plugin or the one you exported from phpmyadmin. And click on Go.

restore backup

And you are done !

Final words – I Hope this article would help you create a backup and restore it successfully. There are a lot of plugins include paid ones too which do this job, but you can do it free using the steps mentioned above. In future articles I’ll post a detailed guide on How you can backup and restore your complete Ftp directory.

Although this post is sufficient to create and restore a database backup, I still think you might have a better way. If you have another way of backing up and restoring back wordpress , do comment it below.

This article includes messing up with FTP directory also, you can take a look at one of previous posts to learn how to add/delete files in FTP.

If you have ever restored a backup , do share your experience below. Or If you encounter any hardships while restoring or in creating a backup, let me know in the comments.

So, did you create your Backup ?

Rachit Singh

Rachit Singh is an Amazon best selling author, ghostwriter & marketer. The think tank behind this blog and contributor at many other blogs. In the past 3 years, Rachit has ghosted & written more than 500 blog posts for several businesses and individuals. As a marketer, worked with business in different sectors and helped them grow online.

Click Here to Leave a Comment Below 4 comments

Hi Rachit

I have read your article …its very useful for me
Thanks bro you solve my problem with easy method
Sachin Recently wrote an article Interview with Blogger ( Mahesh Dobhal

    Rachit Singh

    Hi Bro,

    Glad that it solved your problem. If you come across any problem do let me know, I’ll surely come to the rescue.

Joy Healey

Hi Rachit

Thanks for the explanations, but to be honest I’m looking for a completely non-technical solution that I can leave clients with in case I ever go away or am unavailable.

I WAS making backups using the WordPressToDropBox plugin – then I lost one of my other sites on Saturday and couldn’t figure out how to restore it from that plugin. The suggested solution in Google led to a dead link!

I had a paid solution through Hostgator, but that returned an empty site and Hostgator support couldn’t tell me which database belonged to my site to try restoring that.

Luckily I had a full backup from ftp on my PC and restored that, which is as near to one-click as I’ve got. My site is back again but what a mess and waste of time it’s been. Thank goodness I had that manual copy.


    Rachit Singh

    Hi Joy,

    Using the backup plugin is quite easy and restoring it is quite easy as well. But in case someone hacked your website FTP and wiped everything out it might not help at all. Loosing all the data in a hacker attack can be quite painful, so to avoid situations like this you can focus on security and regular backups.
    This has happened to me once, but thanks to the good guys at Ipage, actually they take client side backups and store them on their servers. I was lucky that they found my backup and restored it under a few minutes. But they told me I should take regular backups and store them on my side to avoid situations like this in future.

    Thanks for commenting Joy.


Leave a Reply:

CommentLuv badge