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.

Guide2 min readLast updated
On this page
  1. 1. Create the subdomain
  2. 2. Copy the site
  3. 3. Keep it private
  4. 4. Test
  5. Putting changes live
  6. Disk space
  7. If it doesn’t work
  8. Common questions

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, so check how many you have in MySQL Management before you start.

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 › 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.

Prefer to follow along?

If it doesn’t work

These guides cover the most common problems, starting with what you can see. Or browse every fix for a common problem.

Common questions

How do I create a staging or test copy of my site?

Create a subdomain such as staging.yourdomain.com and install or copy the site there. It is genuinely separate from the live files, costs nothing extra, and is the right place to test updates before they reach visitors.

Password-protect the staging folder so search engines and the public never index a duplicate of your site.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going