Skip to content

Deploy a CMS Site to Optimizely Cloud

⏱ 45 minutes intermediate
πŸ“œCorecms

Getting your first deployment right sets the foundation for your entire development workflow. A clean initial setup means predictable builds, reliable promotions, and confidence that what you test is what your users see.


Optimizely Cloud builds code directly from a Git repository. You need to connect your project’s repository to the cloud platform.

  1. Log into the Optimizely Cloud management portal
  2. Navigate to your project
  3. Go to Settings > Repository
  4. Copy the Git remote URL provided by the portal
  5. Add it as a remote in your local repository:
Terminal window
git remote add opti <repository-url-from-portal>
  1. Push your code to the Integration branch:
Terminal window
git push opti main:develop

The platform automatically detects the push and starts a build.


After pushing, monitor the build process in the management portal.

  1. Navigate to Deployments in the portal
  2. Watch the build log for errors
  3. A successful build shows a green status and logs ending with β€œDeployment completed”

If the build fails, check for:

  • Missing NuGet packages β€” Ensure nuget.config references all required feeds
  • Compilation errors β€” Fix locally, commit, and push again
  • Timeout β€” Large solutions may need build configuration adjustments

Before your application runs correctly, set the environment-specific configuration.

  1. In the management portal, go to Settings > Environment Variables
  2. Select the Integration environment
  3. Add required variables:
VariablePurposeExample
ASPNETCORE_ENVIRONMENTRuntime environmentIntegration
ConnectionStrings__EPiServerDBCMS databaseAuto-configured
Optimizely__Cdn__EnabledCDN toggletrue
  1. Click Save and redeploy for changes to take effect

If you want a custom domain instead of the default *.optimizely.cloud hostname:

  1. Go to Settings > Domains
  2. Click Add Domain
  3. Enter your domain name (e.g., www.example.com)
  4. Create a CNAME record pointing your domain to the provided target
  5. Wait for DNS propagation (up to 24 hours)
  6. The platform provisions an SSL certificate automatically

Once the Integration deployment succeeds:

  1. Open the Integration URL from the portal dashboard
  2. Verify the site loads correctly
  3. Log into the CMS admin interface (/episerver/cms)
  4. Confirm content types are registered
  5. Create a test page and publish it
  6. Verify the published page renders on the front end

When Integration is validated, promote to Preproduction:

  1. In the portal, navigate to Deployments
  2. Find the successful Integration deployment
  3. Click Deploy to Preproduction
  4. Monitor the deployment log
  5. Validate the Preproduction environment using the same checks from Step 5

After Preproduction validation:

  1. Click Deploy to Production in the portal
  2. Monitor the zero-downtime deployment
  3. Verify the Production site with your custom domain
  4. Check health metrics in the monitoring dashboard

SymptomLikely causeFix
Build fails with NuGet errorsMissing package feedAdd Optimizely feed to nuget.config
Site starts but shows errorsMissing environment variablesConfigure connection strings in portal
502 Bad GatewayApplication crash on startupCheck deployment logs for exceptions
CSS/JS not loadingStatic file middleware not configuredEnsure UseStaticFiles() is called
CMS admin login failsAdmin account not seededRun initialization on first startup