In this article I'll teach you how to restore your MySQL database from a database backup within cPanel.

If you've accidentally removed some data from your website's database, or are having some problems with your database, restoring the database to a previously backed up state might be a great option to save you time and hassle.

Of course first of all you'd want to make sure that you've already made a database backup to restore from. I recommend making a database backup prior to any big site changes, or just prior to upgrading to the latest version of software that runs your website.

The method I'm going to review for restoring your database is by using a database backup created directly from within cPanel. By default the MySQL database dump that cPanel creates is going to use DROP TABLE IF EXISTS commands during the restore process.

This means that everything currently live in your database on the server will be irreversibly overwritten by the data in the database backup you'll be uploading to the server. So if you're trying to restore your WordPress database because you removed a new post by accident, and you made a database backup just after creating that post, if there have been other new posts or comments since you made that older backup of the database, they will get dropped and no longer be present after restoring.

Restore database in cPanel

  1. Login to your cPanel.
  2. cpanel click on backupsUnder the files section, click on Backups.
  3. cpanel backups click choose file then openUnder Restore a MySQL Database, click on Choose File.

    Next navigate in the file browser to your database backup you'd like to restore, click on it, then click on Open.

  4. cpanel backups beside restore database click uploadYou should now see your database backup that you've selected, go ahead and click Upload.
  5. cpanel backups database backup restoredFinally you'll see the full backup that got restored, notice how it mentions our userna5_wordpress database already existed, and also it's using the DROP TABLE IF EXISTS command.

Congratulations! Hopefully restoring your database to a previous working version that you've backed up, has successfully brought back your missing data or allowed your site to function again properly.

You should also learn about how to backup website files in cPanel, and restoring website files in cPanel to complete your knowledge on how cPanel handles restoring the different parts of your account.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?


Post a comment
n/a Points
2014-06-03 1:05 am

hello, I have download a database for backup and did a test restore thru cpanel. It always keeps coming up error or timeout. I did a few downloads to make sure the file was not corrupt.


any suggestions

7,372 Points
2014-06-03 7:58 am
How large is the database? Could you provide the specific error that you get?
n/a Points
2014-06-03 6:11 pm

Hi, I have called my hosting site (Hostgator) twice to help me with the "file already exists" issue on cpanel; they say they have deleted all info so I can move forward in creating my blog but after waiting 3 hours it is still the same issue.  Do you think I should cancel my account and start all over?  Thank you Kindly.

9,521 Points
2014-06-03 6:20 pm
Hello gaby, and thanks for your comment.

Did you already previously backup your MySQL database in cPanel?

If so, by default it should have created a backup file that contains DROP TABLE IF EXISTS lines before each of your CREATE TABLE statements in that backup file.

You can see in the last screenshot on this guide for restoring your MySQL database in cPanel that you will get a message saying the database already exists. But it still goes ahead and drops any tables that exist in that MySQL database and then should proceed to create them all back with the data in your MySQL backup file.

I'd ask them to restore the database for you if you're still having issues. If you wanted to cancel your account and start over with InMotion Hosting we can assist you with restoring a database backup if you were running into problems doing it yourself.

- Jacob

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 200883

Related Questions

Here are a few questions related to this article that our customers have asked:
Restore table in my database
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!