How to restore your WordPress website from backup? Print

  • 2

This article describes step by step guidance on how to restore WordPress website from backup. You will need to restore WordPress in case a disaster strikes your website, such as getting compromised or infected by malware, loss of data, version update, etc.

What you will need?

You must be having functional and malware infection-free backup of web-contents and database to restore from. We recommend making a database backup prior to any website changes, or just prior to upgrading to the latest version of the software that runs your website.

Restore WordPress database using cPanel, phpMyAdmin and WebsitePanel

Linux Shared Hosting and WordPress Hosting customers can restore WordPress database either via cPanel or phpMyAdmin itself. Here we have described both methods.

MySQL database restore using cPanel

You can perform following steps to restore MySQL database via cPanel.
  1. Login into your cPanel account.
  2. Scroll down to Files section and click on Backups.

    Select Backups Option from cPanel to Browse your Backup File

  3. On 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 appropriate backup file from your local computer and click on Upload. It may take 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. You can either create a new database and import your backup into it, or you can empty your existing database and import backup.

If you are cleaning a compromised WordPress website, then it is very crucial to change your MySQL username and password prior you create a new database or import into existing database.
  1. Login into your cPanel account.
  2. Scroll down to Databases section and click on phpMyAdmin.

    Select phpMyAdmin Option from cPanel

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

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

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

    Select Backup File with Additional Option and Import the Database

  5. This process will take some time depending on your database size. The completion of this process without any error assures the successful database restore.

MySQL database restore using WebsitePanel

Windows Shared Hosting customers can restore the MySQL database backup by referring to article here. Once your WordPress database is restored successfully, you will need to upload the WordPress backup files to the web space.

Restore WordPress Files/Folders using FTP

Following step is common for both Windows and Linux Shared Hosting customers. In this step, you will need to replace the existing WordPress files with functional WordPress files from available backup.
  1. Connect via any FTP client to your web space.
  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

Note:- If you have created the complete new database instead of importing on current database as above, you will require to update the database details on wp-config.php file.

Was this answer helpful?

« Back
Sign up for a newsletter