In this knowledgebase post, we will learn how to restore the MySQL database from a database backup within cPanel.
If you accidentally deleted some data from your website’s database, or the database got corrupted due to some reason, restoring the database to a previously backed up state is a great option that can save your time and hassle.
Of course, you will need to already have a database backup to restore. It is always a good move to keep the database backup prior to any big site changes, or just prior to upgrading to the latest version of software that runs the website.
Restore database backup in cPanel
Step 1: Login to your cPanel. (Can take cPanels live demo here using Username: mwdemo | Password: lm4HPl82*PQC for free)
Step 2: Click on Backup under the files section.
Step 3: Under 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.
Step 4: You should now see your database backup that you’ve selected, go ahead and click Upload.
Step 5: Finally, you will 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.
Now you are done with restoring your database to a previous working version that you have backed up and has successfully brought back your missing data or allowed your site to function again properly.
You should also read the knowledgebase post on A step by step process to Backup your website files in cPanel!
cPanel is a user-friendly platform to work with if it is backed by the best hosting platform. If you want to migrate your website to a reliable hosting provider, check out our Shared hosting plans.