Skip to content

Restore a site from a backup and undo a restore

What to check before restoring, the restore window step by step, what happens during each phase, the possible results and how to undo a restore within 24 hours.

Restoring puts a site back to the state it was in when a backup was taken: files and database are both replaced. You start a restore from the dashboard with one click; WP Safer and the WP Safer plugin on the site do the rest, and you can undo a successful restore for 24 hours.

Before you restore

  • Everything after the backup is lost. Posts, orders, comments, form entries or users created after the backup was taken will be gone. On a shop or a busy site, export anything you need to keep first, or take a fresh backup so you can come back to the current state.
  • The site must be reachable. The restore runs on your own server through the WP Safer plugin, so the site has to respond to WP Safer. If the site is marked inactive or its last health check was not OK, the confirmation window warns you; the restore can still be started.
  • Enough disk space on your host. The backup is unpacked next to the live site and the current files are kept aside for the undo, so the server needs free space for both. The restore checks this first and stops without changing anything if there is not enough.
  • Only one job at a time. A restore cannot start while another restore is running for the site, or while a backup of the site is waiting in the queue or running.

Start a restore

  1. Open Sites, click the site, and go to the Backups tab.
  2. Find the backup you want to go back to — the list shows the date and time of each backup — and click Restore in its row.
  3. Review the Restore this backup? window:
    • Target backup, File and Type / size identify the backup.
    • Chain shows how many archives will be used. A full backup is 1 archive; an incremental backup also needs the full backup and the incremental backups before it, and they are all used automatically.
    • Any warnings are listed below the facts.
  4. Optionally tick Also delete media files that were removed between these two backups (see below).
  5. Click Yes, restore.

The restore is added to the queue and starts within a couple of minutes. If WP Safer finds a problem with the backup chain — for example an archive is missing — the window does not open and the reason is shown instead.

What happens during the restore

A progress bar appears at the top of the Backups tab and updates by itself; you can leave the page and come back. It shows the current step and the elapsed time:

  1. Checking the site — PHP version and extensions, write permissions, database access and free disk space. If a check fails, the restore stops here and nothing on the site is changed.
  2. Downloading archives and Extracting archives — the backup is unpacked in a separate folder, next to the live site.
  3. Replacing files and Replacing the database — the site is put into maintenance mode and the new files and tables are swapped in. The previous files and tables are set aside, not deleted.
  4. Verifying — maintenance mode ends and the site calls itself to confirm that WordPress and the WP Safer plugin work.
  5. Cleaning up — temporary files are removed; the set-aside copy is kept for the undo.

While the restore runs, the Start full backup, Start incremental, Restore and delete buttons for this site are disabled, and scheduled backups for the site wait until it is over. You can also see the job under Tasks → Restore jobs.

How long it takes depends on the size of the backup, the length of the chain and the speed of your host. Visitors see the WordPress maintenance message only while files and the database are being replaced; the download and extraction happen while the site is still online.

Results

  • Completed — the site now matches the backup. Every signed-in user, including you, is signed out and has to log in again.
  • Rolled back — something went wrong after the swap (for example the site did not answer the verification). The previous files and database were put back automatically, so the site is as it was before the restore. The reason is shown in the progress area.
  • Failed — the restore could not be completed, for example because a check failed or an archive could not be downloaded. Usually this happens before the site is changed at all. The reason is shown in the progress area; if it is not clear what to do, contact support with that message.

A restore that is still not finished after 3 hours is stopped automatically.

Undo a restore

For 24 hours after a successful restore, the progress area shows You can undo this restore until … with an Undo the restore button.

  1. Click Undo the restore.
  2. Confirm with Yes, undo.

The files and database that were set aside are swapped back, and the site returns to how it was right before the restore. After 24 hours the undo is no longer available and the button disappears; to go back further, restore an older backup instead.

Good to know

  • Files added after the backup are not deleted. A restore puts back every file from the backup, but files that did not exist yet when the backup was taken (for example media uploaded later) stay on the server.
  • "Also delete media files that were removed between these two backups" only matters when you restore an incremental backup. If a media file was deleted from the site between the full backup and the incremental backup you restore, the file would otherwise come back from the full backup. With the box ticked it is removed again. Media uploaded after the backup you restore is never touched. The box is off by default.
  • The WP Safer plugin itself is not replaced. The plugin keeps its current version after a restore, so the site stays connected to WP Safer.
  • The next backup is a full backup. After a restore, scheduled backups start a new chain automatically.
  • Moving to another host is a different feature. Restore always writes to the same site. To copy a backup to a new hosting account, use the migration wizard — see Before you migrate.