How to Restore your WordPress Website from Backup?

This article describes step-by-step guidelines on restoring the WordPress website from a backup. You will need to restore WordPress if a disaster strikes your website. For example, it gets compromised or infected by malware, loss of data, version update issue, etc.

What will you need?
To restore, you must have a functional and malware infection-free backup of web contents and database. We recommend making a database backup before any website changes or just before upgrading to the latest version of the software that runs your website.

Restore WordPress Database using cPanel, phpMyAdmin, and Website Panel
Linux Shared Hosting and WordPress Hosting customers can restore the WordPress database via cPanel or phpMyAdmin; we have described both methods here.

MySQL Database Restore using cPanel.
You can perform the following steps to restore the MySQL database via cPanel. 

1. First, log in to your cPanel account.
2. Scroll down to the Files section and click on Backups.

Select Backups Option from cPanel to Browse your Backup File

3. On the Backups page, scroll down to Restore a MySQL Database Backup and click on Choose File.

Select Backup File using Browse Button and Upload it

4. Browse the appropriate backup file from your local computer and click on Upload.
It may take a few minutes while cPanel uploads and restores MySQL backup.

MySQL Database Restore using phpMyAdmin
When restoring a manually created backup, you may come across two possible choices – 

  1. You can either create a new database and import your backup into it 
  2. You can empty your existing database and import a backup.

Suppose you are cleaning a compromised WordPress website; changing your MySQL username and password is crucial before creating a new database or importing it into the existing database. 

1. Log in to your cPanel account.
2. Scroll down to the Databases section and click on phpMyAdmin.

Select phpMyAdmin Option from cPanel

3. Click on your WordPress database and choose the Check All option to select all tables. 
4. From the drop-down list, select the Drop option to empty the database.

Select All/Desired Tables from the List and Drop them to Empty the Database

5. Now, you have an empty database to restore your backup database on it. Select the WordPress database and click on the Import tab on the top in phpMyAdmin.
6. Now, click on Browse and select the database file stored on your local computer. Ensure the SQL is selected in the Format drop-down menu and click on Go.

Select Backup File with Additional Option and Import the Database

7. This process will take some time, depending on your database size.

The completion of this process without any error assures a successful database restore.

MySQL Database Restore using Website Panel.
Windows Shared Hosting customers can restore the MySQL database backup by referring to the article hereOnce your WordPress database is restored successfully, you will need to upload the WordPress backup files to the webspace.

Restore WordPress Files/ Folders using FTP
The following steps are common for both Windows and Linux Shared Hosting customers.

NOTE - In this step, you will need to replace the existing WordPress files with functional WordPress files from the available backup. 

1. Connect via any FTP client to your webspace.
2. Locate the home directory of your WordPress installation and replace those files with your backup files stored on your local computer.

Upload WordPress Files/Folders through FTP

Suppose you created an entirely new database instead of importing the current one; in that case, you will require updating the database details on the wp-config.php file.

Was this answer helpful?

« Back