How To Restore A WordPress Site

If disaster strikes and your WordPress site is destroyed you need to restore your site from a backup. This article shows you how to do just that.

Assumption: You have a good backup which contains both your database and all files related to your WordPress site.

Our recommended backup solution is described here. If you use a different backup method your files might be organized slightly differently.

To restore your site follow these steps:

  • Unzip your backup file.

  • Find the xxxxx.sql file and move it to another directory.

  • In your cpanel account open phpMyAdmin.
    Cpanels look slightly different depending on which hosting provider you use.
    Open phpMyAdmin 

  • Select your database and Import the xxxxx.sql file.
    Import Database 

  • On your hosting account remove any existing files and folders from your WordPress site folder. This is typically everything in the public_html, www or html folder if you only have one website on your hosting account.

    Do not remove the folder itself, rather delete everything inside the folder.

    Tip! Do this using the FileManager on your hosting account instead of your FTP client. Your FTP client would delete one file at a time and that could take some time.

  • Using your FTP client transfer the remaining files from the zip file to your WordPress site folder on your hosting account.

Your site should now be in the same state as when you made the backup.

Note: If you are restoring your WordPress site to a different hosting account there are a couple of additional steps:

  • You need to create a database and a database user.
  • You need to modify the database settings in wp-config.php to match your new setup.
  • If you have any plugins which hold the file path in their configuration you will need to verify those settings. For example BackWPup stores information about backup paths.

whiterabbitFollow The White Rabbit

[gn_spoiler title="Click Here" open="0" style="1"]Are you reading this article as a part of the Interactive Version of The WordPress Security Checklist?

Then you can find your next article below.

If not you should take a look at the Table Of Contents.

Next article: Test your site
Previous article: WordPress Site Backup[/gn_spoiler]

Questions Or Comments?

Please leave them below. Thanks!

About Anders Vinther

Anders is on a mission to make it easy for you to secure your WordPress.

Let's make it harder for the bad guys!

Want More?

Sign up for our newsletter and we'll let you know when we have got new stuff about WordPress Security for you. See past emails.

Most Popular Articles – All Time

Most Popular Articles – This Week

Speak Your Mind

   Login Using:


To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see