What's WP
Find Everything Related to WordPress - Best Tutoriasl on WordPress!
How To Backup and Restore Your Database in cPanel?

How To Backup and Restore Your Database in cPanel?

In this article, we will show how to backup and restore your database in cPanel. Before that, you will have learned the great importance of database backup which can save you much time and energy to restore your data in the event of data loss.

backup datebase in cpanelBacking up the database is an important step to take for the website security. Data loss won’t bother you if you don’t forget to back up which can smooth your road. The importance of backing up your database cannot be overemphasized.

There are many different approaches to back up your database with ease. But if you’re using a Linux-based web hosting service with control panel cPanel, that makes things easy. In below, we introduce the steps of using cPanel to backup your database.

The database is essential to keep the website online and running well, if you have a database driven website. Today, attacks and hacks happen every day, and the number of security issues is increasing dramatically. Chances are that some data will be lost from your database, which will bring a disaster to your website. So it’s extremely important to backup your website on a regular basis, especially due to the following reasons.

  • Sometimes, some quality web hosts like BlueHost, InMotion Hosting, and HostGator plan to back up the server. But they may not run their backups as often as you would require your site to be backed up. So you should not have a good expectation for web hosts.
  • If you website is hacked unfortunately, you can restore it from the most recent secure backup. If you haven’t backed up your site already, you have to weasel out every little bit of infected code.
  • You always need to keep the website script and plugins up-to-date for some reasons such as security, features, etc. Remember to back up your site before upgrading, because any small mistakes or incompatibility issues may cause your website down or damaged. However, it’s simple to restore the site if you have a backup.
  • This can be the case when you have just done with some wonderful content posting. Creating a copy of your database will avoid the situation to rewrite the content.

Backup MySQL Database with cPanel

All these reasons show that it’s important to backup database regularly. Always, make a database backup before making any big changes to your website or upgrade to the latest version of your application. Indeed, it’s easy to backup via cPanel which is powerful to help you manage your hosting account and websites. In below, we introduce the steps carefully, which can help you back up your site within minutes.

  1. Log into your cPanel account. In general, the address is http://yourdomain.com/cpanel.
  2. Scroll down to Files, click on Backups.

    click on Backups

  3. You will be linked to Download a MySQL Database Backup section. Click on your database name under the Partial Backups. In this case, it is userna5_wordpress. As you see, you can even do a full backup which includes all the files in your home directory, your MySQL database, and your email forwarders and filters.
  4. Download a MySQL Database Backup

  5. Download the file and save it in your local computer. You can see a compressed .sqp.gz file.
  6. compressed backup file

Now, you have successfully backup your database and locally stored the file on your own computer. If your database has something problems or you delete something by accident, you can quickly restore it from the backup.

Restore MySQL Database with cPanel

Restoring MySQL database to a previous backup state is a great way to get the website working well. As well, the process is quite easy, just a reverse process of the backup.

  1. Log into your cPanel account.
  2. Scroll down to the File, and click on the Backups.
  3. Under restore a MySQL Database, click on Choose File. You will be taken to browse your database backup, find and select it, click Open and then click Upload at last.
  4. restore a MySQL Database

  5. It will take some time to restore. Finally, you can see that the database has been restored to a previous working version. Then your website can function in a proper way, because you bring back missing data. During the process, the userna5_wordpress database has already existed.
  6. restored a MySQL Database


Joyce is a professional writer & SEOer who loves trying new things and sharing the experience through blogging. She loves clean design, playing with different WordPress themes, SEO, etc. Very often, you could find her in various WordPress event as invited speakers.