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.

Like this Article?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

I'm Jacob Nicholson, your friendly Community Support technician, and I wrote the article you're looking at now. I like to think it's perfect, but I'm sure you have some suggestions. Please, let me know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Latest Questions

If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Ask a Question!
Recent Questions
  1. Connecting email to gmail?
  2. Can I have Oscommerce installed on my site's server?
  3. I'm having trouble publishing with iWeb

Need more Help?

Search

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: support@InMotionHosting.com
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!