Skip to content

Setting up a staging branch deployment workflow

development

A staging deployment should test the application without changing production data or sending real customer actions. Separate configuration and service identities are as important as the branch name.

01 Check access and requirements

Choose the staging hostname, repository branch or pull-request workflow and a hosting environment that matches the required production capabilities.

02 Set up a staging branch deployment workflow

  1. Create a separate application deployment with its own database, storage namespace and private configuration. Use protected or anonymised data appropriate for testing.

  2. Connect the reviewed staging branch or workflow to that environment. Make the deployment show the commit or release identifier for traceability.

  3. Replace production mail, payment and external API credentials with approved test equivalents. Disable or isolate jobs that would contact real customers.

  4. Protect staging access where it contains non-public content and configure search indexing controls appropriate to the site. Authentication is needed when content must actually remain private.

  5. Run the setup and migration process from a clean deployment, then test the workflows needed before production release.

03 Confirm the expected result

Verify a test order, message or scheduled task stays in the test systems. Confirm the staging app cannot write to the production database or upload store.

04 Resolve setup problems

If production receives a test action, pause the responsible integration and correct shared credentials or endpoints. A different domain name alone does not isolate backend access.

05 A common question

Can staging use the production database to stay current?

Prefer a separate controlled copy or a deliberately designed read-only integration. Sharing writable production data makes ordinary tests capable of changing live customer records.

06 Example: use a staging branch to review a change

Keep the deployment destination explicit. A branch called staging does not make a release safe if the deployment job still points to the live document root or production database.

  1. Confirm the staging hostname, database and environment configuration are separate from production.
  2. Push the review change to the intended branch and inspect the deployment's selected commit.
  3. Test the feature with non-production data and prevent test email or payment activity from reaching real customers.
  4. Record the approved commit and promote it through the established production process.

Can I copy the entire staging database back to production?

Do not assume that is safe. A busy site may have received new orders, accounts or messages since staging was created. Use a deployment method appropriate to the change and preserve newer live data. Review schema migrations and content moves separately from code files.

If a deployment reaches the wrong destination, stop further releases and preserve the job log. Tell us the affected service, intended destination and actual path, with secrets removed. A clear environment map helps both your team and ours resolve the issue without making another change against the wrong website.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support