Hosting Hosting Features Spanish version

Support article

Staging Environment: How to Create a Test Copy of Your Website

Learn what a staging environment is and how to create a test copy of your website to test changes before publishing to production.

Published: 12/07/2026 Updated: 12/07/2026

Introduction

Have you ever updated a WordPress plugin and it broke your website? Or changed something in the design and when publishing it everything stopped working? It’s a very common and very frustrating situation.

The solution is called a staging environment (or test): an exact copy of your website where you can make changes and test them without affecting the real version your visitors see. In this article you’ll see what it is and how to set it up.

What a staging environment is

A staging environment is a copy of your website, hosted at a different URL (for example staging.yourdomain.com or yourdomain.com/staging), where you can:

  • Update plugins and themes without risk.
  • Test design changes.
  • Test new features.
  • Check nothing breaks.

When everything works well in staging, you clone or copy those changes to the production version (the one your visitors see).

[Imagen sugerida: diagram of the development → staging → production flow]

A staging environment is to a website what rehearsals are to a play: you test before the premiere so everything goes well.

Difference between development, staging and production

EnvironmentWhat it’s forWho sees it
DevelopmentWhere you program and make changesOnly you
StagingWhere you test before publishingYou and your team
ProductionThe real website, liveAll your visitors

The ideal flow is: development → staging → production.

Why you should have a staging environment

  • You avoid breaking the real website. Changes are tested in staging before going to production.
  • You check updates. You can see if a new plugin breaks something before updating it in production.
  • You work calmly. You’re not in a hurry because the real website keeps working.
  • You show changes to the client. If you make websites for others, the client can review in staging before publishing.
  • It reduces stress. If something fails in staging, no problem. If it fails in production, yes.

How to create a staging environment

There are several ways. Let’s see the most common.

Method 1: With a subdomain (most common)

  1. Create a subdomain from cPanel (for example staging.yourdomain.com).
  2. Copy the files from your website to the subdomain. You can do it with cPanel’s file manager or via FTP.
  3. Copy the database. Export the production database and create a new one for staging.
  4. Update the URLs in the staging database so they point to the subdomain.
  5. Test that everything works at staging.yourdomain.com.

In WordPress, the URL update step is important. You can use a plugin like Better Search Replace to change all the URLs in the database.

Method 2: With a WordPress plugin

If you use WordPress, there are plugins that automate the whole process:

  • WP Staging: creates a copy of your website in a folder in one click.
  • Duplicator: lets you package your website and deploy it elsewhere.
  • All-in-One WP Migration: exports your website and imports it to another location.

[Imagen sugerida: screenshot of the WP Staging plugin creating a copy]

WP Staging is the simplest option: one click and you have a functional copy at yourdomain.com/staging.

Method 3: With Softaculous

Softaculous has a clone function that copies an installation to another location:

  1. Go to Softaculous → All Installations.
  2. Click the Clone icon on your installation.
  3. Choose the destination domain or folder.
  4. Softaculous clones files and database.

Method 4: On a VPS

On a VPS, you can have two folders or two sites configured in Nginx/Apache, and clone from one to the other. That’s what professional development flows do.

How to pass changes from staging to production

Once you’ve tested in staging and everything works, you need to pass the changes to production. You have several options:

Option 1: Migration plugin

With All-in-One WP Migration or Duplicator, you export the staging site and import it to production.

Careful: this overwrites the entire production website. Make sure you have a backup.

Option 2: Manual selective copy

If you’ve only changed some files (for example, a theme or a plugin), copy only those from staging to production.

Option 3: With Git

If you use Git to manage code, the flow is very clean:

  1. You make changes in the staging branch.
  2. You test.
  3. You merge staging with main (which is production).
  4. You deploy.

Database isolation

A critical staging point: the staging database and the production database must be independent.

If you mistakenly connect staging WordPress with the production database, any change in staging will affect the real website. And orders from a staging online store would end up in the production database.

In an online store, staging must have its own database and never connect to the production database.

Useful tips

  • Protect yourself with a backup before any change. Both in staging and production.
  • Keep staging updated with production. If staging is very different from production, tests are useless.
  • Don’t index staging in Google. Add noindex to staging or put a password on it, so Google doesn’t index it and compete with your real website.
  • Don’t use staging for serious online stores. Orders in staging are test, not real.
  • Document the flow. If you work in a team, make clear who does what and when to deploy.

Common problems

Staging doesn’t work, shows database error

The staging database configuration (wp-config.php) points to the wrong place. Check that staging has its own database configured.

The URLs in the database still point to production. Use a plugin like Better Search Replace to change them.

Staging is much slower than production

It may be that your hosting plan has fewer resources for the subdomain, or that cache isn’t active in staging. It’s normal and doesn’t affect tests.

After cloning, images don’t show

The uploads folder may not have been copied correctly. Copy wp-content/uploads/ from production to staging.

I don’t know if I have staging available

On miHosting’s cPanel hosting plans you can create subdomains and folders without problem. Open a ticket if you need help.

Frequently asked questions

Do I need staging if I have a small website?

It’s not indispensable, but it’s highly recommended. Even if it’s just to test plugin updates before applying them.

Does staging consume my hosting resources?

Yes, somewhat. Each installation consumes space and memory. But it’s a small price for peace of mind.

Can I have several staging environments?

Yes. You can have one per project or one for each change you’re testing.

Does staging update itself when I update production?

No. Staging is a copy at a given moment. If you make changes in production, staging doesn’t know until you clone it again.

Can I do staging locally (on my computer)?

Yes, with tools like Local by Flywheel, XAMPP or Docker. It’s ideal for development, before going to staging on hosting.

Test before publishing

A staging environment is one of the best investments you can make in a website. It lets you test everything calmly, without risk of breaking the real website. It’s a standard practice in professional web development.

If you need help creating a staging environment on your miHosting hosting, open a ticket from your client panel. And if your project needs separate development, staging and production environments, our managed VPS are ideal for professional flows.