CloudLinux.ro
Dev environments

How to set up a staging environment

Updated 7/20/2026

A staging environment is a copy of production where you test changes before they reach customers. It catches problems before they hurt.

What must be identical

  • The same operating system and software versions.
  • The same web server and database configuration.
  • Representative test data (no real sensitive data).

1. A separate server

Cleanest is a dedicated VPS for staging. With hourly billing, you can start a staging server only while you test and delete it after, paying very little.

2. A separate subdomain

staging.example.com    A    STAGING_SERVER_IP

See how to create subdomains.

3. Protect it

Staging should not be indexed by Google or publicly accessible. Add basic authentication and a robots.txt that blocks indexing.

4. Copy data from production

Periodically bring a copy of the database, see migrating a database, but anonymize sensitive customer data.

The full flow

You develop locally, deploy to staging, test, then deploy to production, ideally through a CI/CD pipeline.

Put this guide into practice on your own VPS

EU cloud servers, billed hourly, ready in minutes, with one-click installs for dozens of apps.

See pricing

Related tutorials