How To Restore A WordPress Website From Database Backup

How To Restore A WordPress Website From Database Backup

Scenario 1: The Internet is an open environment and there are good people as well as bad people in here. Some are helping you with their knowledge and others want to push you down for no reason. Some just want to create havoc in unknown person’s life or business without any reason whatsoever. Your WordPress website may become a victim of one such person and you may lose your month’s or year’s effort in minutes.

Scenario 2: There can be another situation where your hosting service provider shuts down its business and you are left with a missing website. You are in shock!

Scenario 3: You yourself made a blunder and screwed your website on your own. You tried all possible ways to recover it. Now it is completely gone with no possibility to recover.

Have you ever thought that what would happen if your website crashes suddenly? Now there can be a situation like

  1. If you have a complete backup of your website (File + Database) or
  2. If you only have the backup of your Files and not the database
  3. If you only have the backup of your database and not the files
  4. If you don’t have any backup.

If you are in situation 2 or 4, get ready to start your website from scratch, there is no way you can restore your website. Hopefully you have the content and images available somewhere. But if you are in situation 1 or 3, you can restore your website. Specially if you are in situation 1, you can easily restore your website in a similar way as you migrate your WordPress website to a new hosting . But if you are in situation 3, it is a bit typical to get your website back. Let’s discuss how you can get it back.

Before you continue with this article further, you should have the following :

1. Credentials to your hosting control panel.
2. Backup of your Database.

Let’s see how you can the backup of your database (this you should have done when your website was working) :

  1. Open phpMyAdmin tool
  2. Go to the database of your WordPress website (if there are multiple databases in here and you don’t know which one it is. You can check in your WordPress installation’s wp-config.php file.
  3. Now click on the Export button
  4. It will show some options and a Go button.
  5. Leave all the options as it is and click the Go button
  6. It will ask you to save the Database in some location
  7. Select the location and press save button. You have the database backup now.

Restoring The WordPress Website From Database Backup :

1.  Create A New Database:

Create a new database and database user by using the MySQL Database Wizard tool. Note down the database user’s password somewhere, it will be needed in coming steps. You can use the phpMyAdmin tool to confirm whether this database is created. Following steps will take place in this process :

  1. Enter the name of the database
  2. Enter the username for the database user
  3. Password for the database user (better generate it from the password generator)

2. Import the WordPress Database Backup to the newly created Database.

Now take the backup of your database from your earlier WordPress website, we will upload it to the MySQL database we just created in the last step. Follow the given steps:

  1. Open the phpMyAdmin tool
  2. Go to the database created in the last step and open it
  3. Now click on the import button
  4. It will show you a browse option. Browse the database backup file
  5. Leave the other options as it is
  6. Click the Go button at the bottom
  7. If all goes well, it will give you a success message
  8. Confirm by checking the tables in this database. If all the tables are in place, you are done.

3.  Re-Install WordPress
Download the WordPress installation files and Upload the WordPress file to your hosting account. You can get the WordPress installation files from To upload follow the given steps :

  1. Go to File manager
  2. Open public_html directory
  3. If you have to upload WordPress in the root directory then just click the Upload button
  4. It will ask you to browse the file you want to upload
  1. Browse the file and click on the upload button
  2. The zip file will be uploaded
  3. Now you can extract this zip file.

Just don’t run the WordPress installation.

4. Setup the wp-config.php file 

Setup the wp-config.php file with the database details, we created in earlier steps. To do this follow :

  1. Open File Manager
  2. Open public_html directory where you just extracted the WordPress installation zip file
  3. Here you will find wp-config.php file.
  4. Open this file in edit mode.
  5. Fill the values of Database Name, DB Username and Password at the appropriate location.

5. Check if the Website is opening  –

Check if the website is opening with the default theme and some showing some data from your earlier website. Check the admin panel also if it is opening with the earlier username and password. If it is, it means the basic setup is done. Though it is not done yet.

6.  Re-install the Themes and Plugins

Re-install your themes which was there in the earlier website. Also, re-install your earlier installed plugins.

7. Now Fix the Permalinks as it was earlier
You can fix your Permalinks by clicking on Settings on your Dashboard and after that executing your Permalinks section. Click Save Changes at the bottom of the window

8. Put up the Missing Images
Re-upload each and every image that is missing from the content. Check page by page and upload the image. You should understand that the image are not store in the Database. They reside in the upload folder which was there in the Files, for which you don’t have a backup now. This is going to be the most hard-working part in this whole process.

About the author

I am Ali, a Software Engineer. I love the latest technology as well as Digital Marketing. Also, I Love to Write about the latest and upcoming technologies and Gadgets. I Love to travel around the world and learn new things..

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.