How to Backup and Restore Your WordPress Database

Ok so your doing fine, everything is going well and then one day someone breaks in to your site and F***s it up.

Well at this point your gonna be pretty mad and who can blame you. However if you have been doing things right, then you should have some backups and if you haven’t well then there is a problem and this tutorial will certainly help you out in the future.

This tutorial is going to show you how to back up and keep your files safe. By the end of this tutorial you should be confident enough to spread your wings and backup like a pro.

There are a number of way to backup your site and I am going to take you on a journey through the methods that will apply to you.

You can follow the instructions below or watch this Video on my YouTube channel, or a combination of both.

Backing up your Database with phpMyAdmin

This first method is very simple and takes no longer than 5 min to complete depending on the size of your database and the speed of your internet connection.

1. Log in to cpanel by typing yoursitename.com:2082 or yoursitename.com/cpanel

2. Select phpMyAdmin.

phpmyadmin in cpanel

3. Select your database from the left hand side.

 phpmyadmin database

4. Select export from the menu at the top.

export button in the menu

5. Hit Go.

 export database by selecting go

Importing your database with phpMyAdmin

The process for importing your database is almost the same as exporting with the exception of selecting import instead of export.

import database with phpmyadmin

Just remember that you have to click on the target database from the menu on the left side. See the video to see a demonstration of what happens when you don’t.

Backing up your Database with Cpanel Backup Wizard

Cpanel comes with a backup system built in to it. This allows you to quickly make a backup of your entire site, or just certain parts of the site. In this case we want to backup our databases.

1. So again log in to Cpanel if your not already there and this time select the backup wizard.

cpanel backup wizard

2. Select backup from the next window.

cpanel backup wizard manager

3.  On the right side you will see 3 options. Select MySQL Databases.

cpanel backup wizard partial backup

4. Then you will be taken to a new page where you can select the required database to backup.

cpanel backup wizard partial backup select database

Once you click on the database it will either just start saving it to your computer or prompt you to do so depending on your browser.

Restoring your Database with Cpanel Backup Wizard

When you use the backup wizard to to create and download backups from your site, it will store them with the .gzip extension.

So for your database that would be “database_name.sql.gzip” and this is the file that you will be uploading via the Backup wizard.

1. It is the same procedure as before except instead of selecting backup at point number 2, you will select restore instead.

cpanel restore database with backup wizard

2. The next window will give you 3 options again. Select MySQL Databases.

3. Choose your backup file and select upload.

From this point on it will take care of the rest and you have successfully restored your database.

So now you are armed with some additional tools and insight in to the world of backing up, you should have no problem keeping your data safe in the future.

Meet the Author

Matthew Horne

Matthew Horne is web developer who specializes in optimized development. He also builds custom solutions instead of reverting to plugins. Matthew Has a strong understanding of PHP, JavaScript, jQuery.

4 comments… add one
  • Happy Hotelier Jun 5, 2013, 12:19 pm

    For larger sites I believe it advisable to always download .gzip files as there is frequently a limit on the size you can upload for a restore…

    • Matthew Horne Jun 5, 2013, 1:04 pm

      That is true however if you have root access to the server you can increase that limit.

  • Adithya shetty Jun 25, 2013, 1:51 pm

    Very helpful article! I use some plugins to backup, i even store my backups on dropbox and google drive!

    • Matthew Horne Jun 26, 2013, 6:30 pm

      I always find my personal computer and backup drives plus server backups to be the most effective, but I don’t see any reason for not adding it to the cloud too, the more the better.

Leave a Comment