How To Restore WordPress Site From Backup

How To Restore WordPress Site From Backup

Probably, you’ve already learned how to backup a WordPress website. And today, wondering how you could actually restore your website in case something went wrong.

Maybe your WordPress website gets hacked by a malicious individual, or in some instance, it just stops working properly.

READ ALSO: 17 Ways To Secure Your WordPress Website From Hackers in 2017

Restoring WordPress from a backup file is not easy for most WordPress users – especially beginners. And recently, one of the WPMakeSite readers ask me exactly how to restore site from backup as you can see below.

WPMakeSite user asking how to restore WordPress from backup

One of WPMakeSite user asking us how to use a backup to restore WordPress in case something went wrong.

In this guide, I will walk you through how you could easily restore WordPress site from backup step by step.

Things You’ll Learn From This WordPress Restore Guide

Please note that in order to restore WordPress you must have a backup which includes all the elements that make up your site (WordPress core, database, theme & plugins, and more).

How WordPress Backup and Restore Works?

Backing up WordPress site comes in different ways and probably, one of the best ways is using a WordPress backup plugin.

Most WordPress experts recommend using BackupBuddy, a comprehensive WordPress backup plugin that allows you to perform automatic WordPress backups and the ability to seamlessly restore WordPress.

Additionally, you can also create WordPress database backup manually using phpMyAdmin and download your WordPress files using an FTP client.

Thus, restoring WordPress site from backups depends on how you’ve created the backup. And if you’ve used BackupBuddy to backup WordPress, restoring it is pretty straight forward.

Likewise, if you’ve done manual sort of backing up WordPress, you also need to manually restore it.

In my case, I usually don’t backup the entire site. Instead, I prioritize the most important one and just leave the rest. I only backup wp-contents folder which includes theme, plugins, and uploads directory, WordPress database, and wp-config.php file. This allows me to save disk space and time and reduce the size of backups.

Take note that this would require downloading a fresh copy of WordPress by the time you need to restore WordPress. It’s much safer especially when your site gets hacked.

Manually Restore WordPress Database Backup Using phpMyAdmin

Normally, if you are just trying to restore your site from an older version since the newer one stops working then you can just empty the existing database and import your backup.

However, in some cases wherein your WordPress website been hacked and gets compromised and want to clean it, then it is very important to change your MySQL username and password before creating a new database or importing backup into the existing database.

To do this, first thing you need to do is login to your WordPress hosting Cpanel.

Remember, your Cpanel may be different than what you would see here. I am using Bluehost hosting. It would be different in SiteGround or any other good web host.

Alright, now click on the MySQL Databases icon under Database Tools.

MySQL Databases in Cpanel

In the next window, give your database a name (yournewwpdb) as an example, and then click on the Create Database button.

Create New Database Cpanel

The system will create MYSQL database. You should see the database “x2demo1_yournewwpdb” has been added. Click on Go Back button to return.

Successfully created MySQL Database

Next, you need a MySQL user to be associated with the newly created database. Scroll down to the MySQL users section and add a new user.

Add a username and a password by manually typing in the field or by clicking the Password Generator button to generate a strong password. A pop-up will appear with the generated password. Tick on the checkbox that says, “I have copied this password to a secure location”. Click on the Use Password button to populate password.

Create strong password using password generator

If you’re not happy with the password, you can repeat the process. Then, click on the Create A User button.

Add new database user

In the next window, you should see successfully created a MySQL user named “x2demo1_newuser” message. Click on Go Back button to return.

Successfully created Database user in Cpanel

Next, you need to add this new user to the MySQL database. To do this, scroll down to Add a user to a Database section and select the user along with the database from the drop down menus and then click on Add button.

Add a user to a Database

Finally, you have to manage user privileges by clicking All Privileges. Click on Make Changes button to save. You should see a successful message above it. Click on Go Back button to return.

Manage User Privileges

Your MySQL database should be ready now. You can use it to restore your WordPress database backup.

Now, go back to your cPanel Dashboard. Click on the phpMyAdmin icon under Database Tools.

PhpMyAdmin in Cpanel

You will then need to import your database. Click on the Import button.

Importing Database Backup in PhpMyAdmin

Then, click on Choose File button to select your WordPress database backup file from your computer. Then click on the Go button right at the bottom of the page to continue.

PhpMyAdmin will now upload your backup and import it into your database. This could take a while depending how big your database is. You should see a success message when done.

Congratulations, you have successfully imported WordPress database. Up next, you’ll have to manually restore WordPress files by using an FTP client.

When you’re ready, let’s proceed.

How to Manually Restore WordPress Files Using FTP

The first thing you need to do is download a fresh copy of WordPress from the WordPress official website and extract it to your computer.

As of this writing, the most latest stable release of WordPress is version 4.8.1.

Take note that if you have a complete WordPress files backup, no need for you to download a fresh copy. Just upload the backup to your server.

In addition, if you’ve only backup wp-content folders and wp-config.php file, then you have to do it.

When everything is ready, let’s proceed.

Now, all you need to do is launch your FTP client and then upload the extracted WordPress files to the server.

You can get this FTP credentials from your web host.

You’ll see a notice if you are successfully connected to the network.

Successfully connected to network

The uploading process can take a while depending how big your website is. Just sit back and relax.

Uploading WordPress files to server using FTP

Once you’ve done uploading WordPress files, you can now upload the wp-config.php file from your backup. You can edit this file using a code editor (ie. notepad++) and enter your database information.

Edit wp-config file

Save it and upload it back to your server.

Now, upload wp-content folder backup.

Alright, that should restore WordPress files. To check if everything is working fine, login to your WordPress dashboard. Go to Settings » Permalinks and update it to match with the old permalinks.

Visit your website, it should work properly now.


Restoring WordPress website from backup can be time-consuming. It also comes in different ways.

What you have just learned today is restoring a website from backup manually.

I’d be updating this guide which might include restoring WordPress using UpdraftPlus backup and BackupBuddy.

For now, I look forward to reading your comments on your experiences restoring your website. Let me know in the comments!


About the Author:

Rodney Lacambra is the founder and editor of WPMakeSite Blog and is a freelance WordPress Developer by profession. Learn more about him here and connect with him on Facebook, Twitter, Google+ and LinkedIn.


  1. Ron August 28, 2017 at 5:52 pm - Reply

    Thanks for sharing this article, Rod. Definitely one of the best guide in restoring WordPress. Do you know why I am getting a 404 error when I try to restore my site?

    Can you also show us if it’s possible to restore WordPress using my UpdraftPlus backup?

    Keep it up and I look forward to your response.

  2. Rodney Lacambra August 28, 2017 at 7:30 pm - Reply

    Hello, Ron. Glad you found this guide useful.

    With regards to your concern of 404 error, did you already check your permalink? Please check it and then save it. This should fix it.

    Also, yes, it’s possible to restore WordPress from your UpdraftPlus backup.

    Like BackupBuddy, it helps you restore your site effortlessly.


  3. NEHA August 29, 2017 at 11:06 pm - Reply

    Hi, very good article
    Thanks for sharing keep up the work .

    • Rodney Lacambra August 29, 2017 at 11:11 pm - Reply

      Thanks, NEHA. Glad you find this guide useful. Keep coming back for more great articles.

  4. Kiven August 31, 2017 at 7:00 pm - Reply

    Thanks for sharing this article. Really awesome and good informative article. Definitely one of the best guide in restoring WordPress.

    • Rodney Lacambra August 31, 2017 at 9:13 pm - Reply

      Thanks for finding this guide in restoring WordPress awesome and useful. My pleasure to be of good help. Keep coming for more informative articles.

  5. Punascha September 2, 2017 at 4:15 am - Reply

    Hi Rodney ,
    thank you mate for the article,. great !

  6. Khyati Taneja September 6, 2017 at 2:09 am - Reply

    Hi Rodney Lacambra,

    Very helpful article. Solved lot of my queries related to WordPress website.

    Thanks a lot

    • Rodney Lacambra September 6, 2017 at 2:19 am - Reply

      Hello Khyati,

      Glad you found this guide useful, it’s my pleasure to help. Let me know what else you need to learn?

      Thank you.


  7. Amit Kapoor September 8, 2017 at 12:22 am - Reply


    I would like to say thank you so much for sharing such a Wonderful Information

  8. Dr October 19, 2017 at 6:53 pm - Reply

    Good work
    Nice article
    Keep up the good work

  9. Ramesh Dhakal October 22, 2017 at 1:08 pm - Reply

    Great article…
    This is helpful for beginner like me.

Leave A Comment


Wait! Don't go just yet.

Get more WordPress tips only shared with email subscribers. Just enter your name and email address below.

This information will never be shared for third part