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.
Â
- Login into your cPanel account.
- Scroll down to Files section and click on Backups.
- On Backups page, scroll down to Restore a MySQL Database Backup and click on Choose File.
- Browse appropriate backup file from your local computer and click on Upload. It may take few minutes while cPanel uploads and restores MySQL backup.
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.
Â
- Login into your cPanel account.
- Scroll down to Databases section and click on phpMyAdmin.
- 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.
- 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.
- 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.
Â
- Connect via any FTP client to your web space.
- Locate the home directory of your WordPress installation and replace those files with your backup files stored on your local computer.
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.