---
title: "Staging Environments & Rollbacks"
description: "Clone live sites into isolated staging environments, selectively push files or databases to live, and roll back static site releases atomically."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.hostedez.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Staging Environments & Rollbacks

Hosted EZ provides two safe-release workflows depending on your site type:

- **1-Click Staging Environments** (Business and Pro plans): Clone any live site into an isolated staging URL (`staging-<slug>.hostedez.site`), test changes safely, and push files and/or database updates to live.
- **Atomic Release Rollbacks** (Static sites, all plans): Every archive deployment is stored as a versioned snapshot (up to 10 retained releases) so you can revert to a previous build in one click.

## 1-Click Staging Environments

Staging clones run on the same hosting node as your live site for fast local file copies and isolated runtime execution. Each live site can have one active staging clone at a time.

> **Plan availability**
>
> Staging environments are included on the **Business** and **Pro** plans. You cannot create a staging clone of another staging clone, or create staging while the live site is suspended or deleting.

### Create a staging clone

1. **Open the Staging tab**

   In the [Hosted EZ dashboard](https://app.hostedez.com), open your live site and select **Staging**.
2. **Create the staging environment**

   Click **Create staging environment**. Hosted EZ provisions an isolated clone at `https://staging-<slug>.hostedez.site` with automatic HTTPS.
3. **Wait for files and database sync**

   Hosted EZ copies your site's files onto the staging environment. For PHP and CMS sites with a linked MariaDB database (WordPress, Drupal, Nextcloud, or Laravel with database), Hosted EZ also provisions a dedicated staging database and clones the live tables into it.

For **WordPress** sites, Hosted EZ automatically updates the staging `wp-config.php` to point at the staging database credentials and rewrites `WP_HOME`, `WP_SITEURL`, and database URLs to the staging preview URL while preserving your table prefix, authentication salts, and custom constants.

### Push staging changes to live

When you are ready to ship your tested changes:

1. Open the **live parent site's** **Staging** tab and click **Push to Live**.
2. Choose what to promote:
- **Site files**: Copies `public_html` from staging to live. For WordPress sites, your live `wp-config.php` is preserved automatically so live database credentials and site URLs stay intact.
- **Database** *(PHP/CMS sites with a linked database)*: Clones the staging MariaDB database back into your live database and rewrites staging URLs back to your live site URL.
3. Confirm the push. Hosted EZ automatically purges your live site's page cache, APCu object cache, and Global Edge CDN cache (when enabled) so visitors see the updated release immediately.

> **Take a backup before pushing a database**
>
> Pushing the staging database overwrites your live database. If your live site receives customer orders, form submissions, or comments while you work in staging, create an [on-demand backup](/operations/backups-and-restore) first or push **files only**.

### Staging behavior on Static sites

Static sites support staging clones for previewing updated HTML/CSS/JS bundles before replacing production:

- Creating staging copies your static site files to `https://staging-<slug>.hostedez.site`.
- Because static sites do not have a MariaDB database, **Push to Live** always promotes **files only** (`includeFiles` must be enabled).

### Delete a staging environment

When you no longer need a staging clone, click **Delete staging** on the live site's **Staging** tab. Deleting staging permanently removes the staging files, its cloned staging MariaDB database (if any), and the `staging-<slug>.hostedez.site` preview hostname without affecting your live site.

## Atomic Rollbacks for Static Sites

For static sites deployed via versioned archives (`.zip`, `.tar.gz`, or `.tgz`), Hosted EZ keeps up to **10 retained deployment snapshots** so you can recover from a bad release without waiting for a rebuild or re-upload.

### Roll back to a previous release

1. Open your static site in the dashboard and select **Deployments**.
2. Find any prior release marked **Retained** in the deployment history table.
3. Click **Rollback** and optionally add a release note explaining the rollback.
4. Hosted EZ atomically switches traffic back to that snapshot, records a new active deployment version pointing to the restored release, and automatically purges the Global Edge CDN cache if CDN is active.

See [Deploy Static Sites](/deploy/static-sites) for archive size limits (`100 MiB` archive, `512 MiB` extracted, `20,000` files) and deployment options.

## Automating Staging & Rollbacks with MCP

You can manage staging and static rollbacks from an AI coding agent via the [Hosted EZ MCP Server](/automation/mcp-server):

| Task | MCP Tool | Scope |
| --- | --- | --- |
| Inspect staging status | `get_staging_site` | `sites:read` |
| Create a staging clone | `create_staging_site` | `sites:write` |
| Push files and/or DB to live | `push_staging_to_live` | `sites:write` |
| Delete a staging clone | `delete_staging_site` | `sites:write` |
| List static releases | `list_site_deployments` | `sites:read` |
| Roll back a static release | `rollback_site_deployment` | `sites:write` |

Source: https://docs.hostedez.com/operations/staging-and-rollbacks/index.mdx
