Backups

Restore a backup

Put a site back from a downloaded backup: import the database dump, copy the files back, and check the site, step by step and safely.

Applies to: Paid plans

The dashboard does not restore a backup for you yet. You restore it yourself from the downloaded zip, which holds everything needed. Safe updates are different: they roll back on their own. See Safe updates and rollback.

On the free plan there are no scheduled backups to download, so keep a backup of your own and restore from it the same way.

If you can, restore to a staging copy first, and only then to the live site.

Before you start

  • Download the backup and unzip it. You get database.sql.gz and a files/ folder.
  • You need access to the server (SFTP or SSH) and to the database, for example through your host's control panel or phpMyAdmin.
  • Take a fresh backup of the site as it is now, in case you need to undo the restore.

Restore the files

  1. Connect to the server over SFTP or SSH.
  2. Copy the contents of files/ over the site's WordPress folder. To return to exactly the backed-up state, delete files that were added since; otherwise leave them.
  3. Keep the current wp-config.php if the database name, user or password have changed since the backup.

Restore the database

  1. Unzip database.sql.gz to get database.sql.
  2. Import it into the site's database, replacing the existing tables: in phpMyAdmin with Import, or over SSH with wp db import database.sql from the WordPress folder.
  3. If the site's address has changed since the backup, replace it: wp search-replace 'https://old.example' 'https://new.example'.

Check the site

Load the homepage and a few key pages, sign in to wp-admin, and in the dashboard click Sync on the site so its data catches up.