Using a subdomain as a staging site

Set up a private copy of your site on a subdomain to test updates, PHP versions and redesigns without risking the live site.

How-to guideIntermediate2 min readUpdated

A staging site is a copy of your site where you can break things safely.

Note: A copy of a database-driven site (WordPress, a shop, a forum) needs a second database. One database is included with your account; an extra one is a £0.99 one-off add-on. Add-ons: extra email accounts, domains, databases, disk space and bandwidth

1. Create the subdomain

Create staging.yourdomain.co.uk. How to create a subdomain

2. Copy the site

WordPress: Softaculous can clone an installation to the subdomain, copying files and database and adjusting the URL. Look for the clone option in your installations list in Extra Features then Softaculous Auto Installer.

Other sites:

  1. Copy the files into the subdomain’s folder.
  2. Export the database and import it into a new database. How to export a database (backup with phpMyAdmin) How to import a database with phpMyAdmin
  3. Point the copy’s configuration at the new database.
  4. Update any hard-coded URLs to the staging address.

3. Keep it private

4. Test

Putting changes live

Staging databases drift from live ones as new orders, comments and posts arrive, so don’t copy the staging database over live on an active site. Repeat the tested changes on live instead, or copy only files.

Disk space

A staging copy doubles the space the site uses. Delete it when you’re not using it.

Popular

Tip: press / to search from any pageSee all results