Test changes on a staging copy
A staging copy is a private duplicate of your website where you can try a new theme, a major update or custom code without visitors seeing anything break. When you are happy, you copy the staging site back over the live one.
1. Make the staging copy
Section titled “1. Make the staging copy”-
Open Websites, select the live website, and in Quick links select Clone, then To a new website.
-
If asked, choose your Package. Enter a domain for the copy, such as
staging.example.com. -
For WordPress, leave Perform a WordPress search and replace selected, so the copy uses its own address instead of the live one.
-
Select Clone and wait for the copy to finish.
You can also start from Add website > Clone a website. See Copy an existing website.
2. Test your changes
Section titled “2. Test your changes”Make and test your changes on the staging site. Sign in to its WordPress with Admin on the staging website’s Apps page.
3. Copy staging back to the live site
Section titled “3. Copy staging back to the live site”Copying back overwrites the live website’s files and databases with the staging copy.
Take a backup of the live site first, so you can undo the copy.
-
Open the staging website, and in Quick links select Clone, then To an existing website.
-
Under Destination website marker 1, choose the live website. Check this twice: the destination is the one that gets overwritten.
-
Under Exclude files marker 2, tick anything that must not be copied. For WordPress, the suggestions are
wp-config.php(the live site’s own settings) andwp-content(uploads, plugins and themes). Use Add custom file for other files or folders. -
Under Databases marker 3 and Users, choose what to copy. Both start with everything selected.
-
Check the other options. They all start switched on:
- Delete files from the destination website if they do not exist on the source marker 4: removes live files that are not on the staging copy, so the two match exactly.
- Sync PHP version: gives the live site the staging site’s PHP version.
- Perform a WordPress search and replace: changes the staging address back to the live one in the copied database.
-
Select Clone marker 5.
Open the live site and check the pages you changed. If something is wrong, restore the backup you took.
4. Remove the staging copy
Section titled “4. Remove the staging copy”Delete the staging website when you no longer need it, or keep it for the next round of changes and refresh it by cloning the live site over it first. See Delete a website.