Restore a backup to staging and share the staging site
Last updated
A staging site is a private copy of your website where changes can be tried and checked without visitors seeing them. Restoring a backup onto staging, instead of onto the live site, lets you look inside an old version safely: check what a page used to say, test whether an old backup is clean, or show a client a change before it goes live.
This guide covers getting a backup or a live copy onto a staging site, and then sharing that staging site with a client or teammate using a share link, without giving them a MaintainHQ login.
First, have a staging site
You need a staging site that is connected to MaintainHQ. Open the site, then choose Staging & hosting from the site’s menu.
- Staging site: Create staging site makes a private staging site on MaintainHQ Hosting. It starts as an empty WordPress site on its own address, asks for a password and is hidden from search engines. It is ready in a few minutes. Only the account owner can create or delete it.
- Environments: if you already have a staging site elsewhere, add it as a site in MaintainHQ, connect the plugin, and link it to the live site.
Once linked, the Staging and deploys card shows Copy production to staging and Deploy staging to production buttons. Both back up each side first, check the site afterwards and roll back automatically if it got worse.
Restore an older backup onto staging
To put a particular backup, such as last month’s, onto the staging site:
- Open Backups in the left-hand menu and choose Restore / Migrate.
- Under 1. Backup to restore, choose the live site’s backup.
- Under 2. Restore onto, choose Another site and pick the staging site from the list. Sites that are not connected cannot be chosen.
- Press Review what will happen and read the list.
- Tick the box, type the staging site’s address to confirm and press Start migration.
The staging site takes a safety backup of itself first. It keeps its own address: links to the live address are rewritten to the staging address, including inside saved settings. The live site is not touched.
Copy the latest backup with Clone a site
Clone a site, also on the Restore / Migrate tab, copies a site’s latest full backup onto another connected site. It is the quickest way to refresh staging from the live site’s latest backup.
- Choose Copy from (the live site). On a site’s own page this is fixed.
- Choose Onto. Staging sites of the same project are listed first and marked (same project).
- Optionally press Add search and replace for extra address changes, such as a content delivery network address. Each search must be at least 4 characters, and you can add up to 20.
- If the source’s backups are encrypted with your own passphrase, enter it.
- Type the target’s address to confirm it is overwritten, then press Clone.
Share the staging site with a link
Share links let a client or teammate see the staging site’s pages without a MaintainHQ login. They cannot log in to WordPress with the link.
- Open the staging site (or its live site) and choose Staging & hosting.
- In the Share staging card, press New share link.
- Fill in the Share this staging site window (see the table below).
- Press Create link. The link is copied to your clipboard straight away, ready to paste into an email.
| Option | What it does |
|---|---|
| Who is it for? (optional) | A label so you know who has which link, such as Client review |
| Expires after | 24 hours, 3 days, 7 days or 30 days. After that the link stops working |
| Password (optional) | At least 4 characters. Visitors must enter it before the site opens |
| Can leave comments | Visitors get a Comment button on each page. Comments show in MaintainHQ and the team is notified |
When someone opens the link, they see a short page with the site’s name. Without a password it opens the staging site straight away; with one, they enter the password and press View the staging site.
Manage links and comments
- Each link shows whether it is Active, Switched off or Expired, how long until it expires and how many times it has been opened. Password and Comments badges show its settings.
- Copy link copies an active link again. Switch off stops a link at once.
- Comments appear under the links, with the page they were left on, who left them and when. Press Done when you have dealt with one.
- Repair links: if links stop working after you copy the live site onto staging, press Repair links to put the share helper back on the staging site.
Automatic deletion of unused staging sites
Unused staging sites can be removed automatically to keep things tidy. In the Share staging card, Delete when unused for offers Account default, Never, or 7, 14, 30, 60 or 90 days. Using the staging site resets the clock, and you get a warning 3 days before deletion. Press Keep to start the clock again.
The Account default for unused staging sites, at the bottom of the card, sets the rule for all your staging sites. A staging site hosted elsewhere is only removed from MaintainHQ, not deleted from its host. Staging copies made by Gus are deleted after 14 days without use, with a reminder 3 days before.