Skip to content

Environment Management

intermediate
📜Corecms

Pushing code directly to production is a recipe for outages. A structured environment model gives your team a safe place to develop, a staging area for validation, and a production environment that only receives verified changes. Understanding how Optimizely Cloud separates these concerns helps you build a reliable delivery process and avoid surprises on launch day.


Every Optimizely Cloud project includes three environments that form a promotion pipeline:

The development sandbox. Code pushed here builds and deploys automatically. Use Integration for day-to-day development, testing new features, and verifying that your application starts correctly.

  • Purpose — Early testing and development
  • Deploys — Automatic on every push to the configured branch
  • Database — Separate instance, often reset or refreshed from production
  • Who uses it — Developers

The staging environment. Code is promoted here from Integration after passing initial validation. Preproduction should mirror production as closely as possible in configuration, data, and infrastructure.

  • Purpose — Final validation before production
  • Deploys — Manual promotion from Integration
  • Database — Separate instance, periodically synced from production
  • Who uses it — QA engineers, product owners, stakeholders

The live environment serving real users. Code reaches Production only after passing through Integration and Preproduction. Deployments here follow zero-downtime patterns.

  • Purpose — Live site serving end users
  • Deploys — Manual promotion from Preproduction
  • Database — Production data with automated backups
  • Who uses it — End users

Each environment is fully isolated at the infrastructure level:

ResourceShared or isolated
Web instancesIsolated per environment
SQL databaseIsolated per environment
Blob storageShared storage account, isolated containers
CDN configurationIsolated per environment
Custom domainsIsolated per environment
Environment variablesIsolated per environment

This isolation means a failed deployment in Integration cannot affect Production. Database schema changes in Preproduction do not touch Production data. Each environment has its own connection strings, API keys, and feature flags.


Applications need different settings in each environment — database connections, API endpoints, logging levels, and feature toggles. Optimizely Cloud provides several mechanisms for per-environment configuration.

Set through the management portal or API. These override values in your application configuration files without requiring code changes.

Common environment-specific settings:

  • Connection strings — Database, search, and cache endpoints
  • API keys — Third-party service credentials
  • Feature flags — Enable or disable features per environment
  • Logging level — Verbose in Integration, warnings-only in Production
  • CDN settings — Cache durations and purge behavior

For .NET applications, web.config transforms apply environment-specific overrides at deploy time. The platform recognizes transform files named by environment:

  • web.Integration.config
  • web.Preproduction.config
  • web.Production.config

ASP.NET Core applications use the standard appsettings.{Environment}.json pattern. The platform sets the ASPNETCORE_ENVIRONMENT variable automatically to match the current environment name.


Code flows forward (Integration to Preproduction to Production), but content sometimes needs to flow backward. Production content — the pages, media, and data that editors create — is often needed in lower environments for realistic testing.

You can export a production database backup and import it into Integration or Preproduction through the management portal. This gives developers and testers real content to work with.

Best practices:

  • Refresh lower environments regularly so tests run against realistic data
  • Sanitize sensitive data (customer emails, payment details) after importing
  • Document the refresh schedule so teams know how current their test data is

Media files stored in blob storage can be synchronized from Production to lower environments. The management portal provides tools for this, or you can configure your application to read from the production blob storage endpoint in lower environments (read-only).


Each environment gets a default hostname:

EnvironmentDefault URL pattern
Integration{project}.inte.optimizely.cloud
Preproduction{project}.prep.optimizely.cloud
Production{project}.optimizely.cloud

Custom domains are supported on all environments. Production typically uses your public domain. Preproduction and Integration can use subdomains for stakeholder access.


Environment-level access controls determine who can deploy, who can view logs, and who can manage configuration.

  • Developers — Typically have full access to Integration, read access to Preproduction and Production
  • QA/Staging reviewers — Access to Preproduction for validation
  • Operations — Full access to all environments for deployment and troubleshooting
  • Editors — CMS access on all environments, but typically work in Production