Cpanel / WHM Tutorials

How to restore your website from backup?

How to restore your website from backup?

Introduction

How to restore your website from backup?

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.

 

MySQL database restore using cPanel

You can perform following steps to restore MySQL database via cPanel.

1.Login into your cPanel account.

How to Access/Login WHM/cPanel and Webmail

2.Scroll down to Files section and click on Backups.

2.Scroll down to Files section and click on Backups.

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

How to restore your website from backup?

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.

How to Access/Login WHM/cPanel and Webmail

2.Scroll down to Databases section and click on phpMyAdmin.

Scroll down to Databases section and click on phpMyAdmin.

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.

How to restore your website from backup?

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.

Make sure the SQL is selected in the Format drop-down menu and click on Go

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.

 

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.

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.

 

Conclusion

Please share if you have any other solutions that worked for you.

end

How to restore your website from backup?

About the author

Jamie Vadym

Jamie Vadym

Founder of Error Hat. Expertise in Virtualization, Cloud Computing, Linux/UNIX systems, Programming,Storage systems,HA, Server Clustering e.t.c.

Add Comment

Click here to post a comment