Home / Fix guides / Broken links, errors and uptime

How to test restoring a website backup

Restore a recent backup to a separate staging copy, never over your live site, then click through it to check that pages, images, forms and logins work. Repeat this every few months, because a backup only counts once you have seen it restore.

Most websites have some kind of backup. Far fewer have ever restored one. Until you do, you only know that backup files exist, not that they can bring your site back. This page shows how to test a restore safely, without touching your live site.

What the problem looks like

You usually do not notice this problem until something goes wrong. The site is hacked, an update breaks it, or a hosting account is closed, and only then does someone try the backup. Common surprises:

  • The backup file is empty, very small or cut off.
  • It has the files but not the database, or the database but not the images and uploads.
  • It is stored on the same server as the site, so it disappears with the server.
  • Backups stopped running months ago and nobody got a warning.
  • The restore works, but takes far longer than anyone expected.
  • Nobody knows the login for the backup service or who is allowed to use it.

Why it matters

A failed restore turns a bad afternoon into days offline. For a shop that means lost orders, and for a service business it means lost enquiries and calls from customers who cannot find you. Long outages can also hurt how search engines see the site, and visitors who hit error pages (see 503 service unavailable) often do not come back.

There is a security side too. After a hack, the newest backup may contain the same malware. You need to know which older copy is clean and how far back your history goes.

How to check your backups for free

Before a full test, answer these questions from your hosting panel, backup plugin or backup service:

  1. Where are the backups stored? At least one copy should be somewhere other than the web server.
  2. How often do they run, and how many past copies are kept?
  3. Do they include both the site files and the database?
  4. When did the last backup finish, and did it report success?
  5. Who has the login, and does more than one person know it?

Then look at the files themselves. Download one and compare its size with your site. A busy site with a database export of a few kilobytes is suspicious. Open the archive and look for your uploads folder (on WordPress, wp-content/uploads) and a database file, usually ending in .sql or .sql.gz.

How to test a restore, step by step

The rule is simple: restore to a separate place, never over the live site.

  1. Download a recent backup to your computer. This proves you can get it out of the system.
  2. Create an empty home for the test: a subdomain such as staging.yourdomain.com with its own empty database, or a local tool on your computer. Many hosts have a one click staging feature that does this for you.
  3. Upload the files and import the database. Hosting panels usually offer phpMyAdmin or a database import tool for this.
  4. Point the copy at its new database. On WordPress that means the database name, user and password in wp-config.php. The site address stored in the database also has to change to the staging address, which a plugin or the command wp search-replace can do.
  5. Protect the copy. Password protect it and tell search engines not to index it, so it does not compete with your real site. Turn off outgoing emails, live payments and scheduled jobs, so a test cannot email customers or take a payment.
  6. Open the staging address and work through the checks below.

Write down every step and how long it took. That note is what you will be glad to have in a real emergency.

Common platforms

Where things live depends on your host, version and theme, so treat this as a starting point.

PlatformWhere to look
WordPressYour backup plugin's settings, or the host's backup page
cPanelBackup or Backup Wizard, plus phpMyAdmin for the database
PleskBackup Manager under the subscription or Websites and Domains
Managed hosts (WP Engine, SiteGround)Backups and staging pages in the host dashboard
AWSSnapshots of the server or database, restored to a new instance

We have platform guides for WordPress and cPanel, and the same idea applies elsewhere. For an online shop, also read the WooCommerce guide, because orders placed after the backup was taken can be lost on restore.

How to confirm the restore worked

A page loading is not enough. On the staging copy, check:

  • The home page and several inner pages open without errors.
  • Images and downloads show up.
  • You can log in to the admin area.
  • Contact and enquiry forms submit (with emails switched off or sent to yourself).
  • Search, menus and any booking or checkout flow work, in test mode for payments.
  • The newest posts, products or orders you expect are present.
  • The page count roughly matches your live site.

If something is missing, you have found a gap in your backup while it is cheap to fix. Change the backup settings, run a new backup and test again.

How to stop it coming back

  • Put a restore test in the calendar every three months, and after any big change such as a redesign, a move of host or a new shop.
  • Keep at least one copy away from the web server, for example in separate cloud storage.
  • Keep several past versions, not only the latest.
  • Turn on failure alerts, and send them to an address someone actually reads.
  • Keep a short written restore guide with logins, steps and the time it took.
  • Make sure two people know where the backups are.

If you want an outside nudge, SiteMonday runs a backup readiness check in week 30 of its Monday schedule. It finds and explains the problem in a written report, and fixing it stays with you or your developer.

Step by step for your platform

Questions

How often should I test restoring a backup?

About every three months is a sensible rhythm for most small sites, and always after a big change like a redesign or a move to a new host. Busy shops may want to test more often.

Can I test a restore on my live site?

No. Restoring over the live site replaces your current content and could make things worse if the backup is bad. Always use a staging copy or a separate test space.

Is a backup from my host enough?

It is a good start, but test it, and keep a copy somewhere other than the hosting account. If the account is suspended or deleted, backups stored inside it can go too.

Does a backup include my database?

It should, but not every backup does. Open the archive and look for a `.sql` or `.sql.gz` file, and check your uploads folder is there too.

How long does a restore take?

It depends on the size of the site and the host, from minutes to many hours. Timing your test restore tells you what to expect in a real emergency.

What if the test restore fails?

That is the point of testing. Note what failed, fix the backup settings or choose another copy, run a fresh backup and test again. If you are stuck, a developer or your host's support can help.

Related problems