---
title: Deploy DXP
slug: dxp/docs/deploying
docTags: 
createdAt: 2026-07-30T20:33:07.587Z
---

:::hint{type="info"}
**Note**
Deploying to Windows app services for clients using Optimizely Content Management System (CMS) 12 is not currently supported.
:::

You can deploy solutions from your development environment to any cloud environment as code packages. You can also move databases and BLOBs between environments using the [source environment API](docId:9v-46N7q90ivFSSprj4u0).

See also [DXP Cloud API](https://world.optimizely.com/documentation/class-libraries/rest-apis/dxc-service/) for Deployment REST APIs.

:::hint{type="warning"}
**Caution**
After going live, you can no longer overwrite the production database using the deployment API.
:::

Optimizely takes care of the following as part of the service:

- Setup of environments.
- Initial troubleshooting and roll-back if issues arise.

## Deploy to production

The following image illustrates deployment from a local development environment to *Production*. In this scenario, the production environment is "empty" initially. You first create code and content in your local development environment and then push this to your *Integration* environment. You then deploy to *Preproduction* and validate that everything works as expected. When ready, you can deploy to *Production*.

![deployment from a local development environment to Production](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/sZPoPtClDSs4OBRUq8mG3-20260722-203650.png "deploymentoverview.png")

## Continuous deployment

After the first deployment, website users edit content in the *Production* environment. As part of the upgrade process, you can move content from *Production* back to the *Preproduction* and  *Integration* environments, where developers can add solution updates.

You can use any deployment tool that supports Azure Resource Manager (ARM), such as Octopus Deploy, Visual Studio Team Foundation Server, or TeamCity.

- **Deploy using Deployment API** – Deploying the code changes using the Deployment API is currently the recommended approach for publishing application code to a DXP Environment. See [Deployment API](docId\:w5bAkyj80j03bZV7GNlrb) for an overview and instructions on how to use the API.
- **Deploy from a version-controlled environment**  – Work in a development team using version control for your source code. You can use any deployment tool such as [Octopus Deploy](https://octopus.com/), [Visual Studio Team Services](https://www.visualstudio.com/team-services/), or [Azure DevOps and Optimizely deployment API](https://world.optimizely.com/blogs/anders-wahlqvist/dates/2019/10/azure-devops-and-episerver-deployment-api/)  (blog post by Anders Wahlqvist) for instructions on how to integrate Deployment API to CI/CD pipeline such as Azure DevOps.

![Deploy from a version-controlled environment](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/neRPVzL-NXZAJ_ApMuhFV-20260722-203650.png "deployoctopus.png")

**Related blog post:** [Azure DevOps and Episerver (Optimizely) deployment API](https://world.optimizely.com/blogs/anders-wahlqvist/dates/2019/10/azure-devops-and-episerver-deployment-api/)  (Anders Wahlqvist)

## Recommended deployments

:::hint{type="info"}
**Note**
Read through and follow the recommendations below to make deployment as smooth as possible.
:::

- Make sure that the software you deploy supports Azure Web Apps. See [DXP requirements](docId\:EbFCNo6K0wQHK--V4b_tz) for supported software and components.
- To avoid data loss or corruption, if you have breaking changes where the old version of the sites' code cannot work with the new database version, deploy using *maintenance page* when you deploy **database schema updates** or **changes to content types**. The target site is then taken offline, showing the ([customizable](docId\:B0Xf87BvPV4oCHxM0kF6y)) maintenance page. If a deployment contains these types of changes, inform Optimizely when ordering deployment to production. You should also ensure that the major or minor version is incremented to trigger the initialization module to make the necessary updates.

:::hint{type="info"}
**Note**
If your changes are additive and do not break the sites when the old and the new code runs in parallel during deployment, you can deploy without using *maintenance page*.
:::

- When you deploy to a production environment, apply the correct configurations.  **Never** use credentials, tokens, or endpoints from a *Preproduction* environment, in *Production*. You can set up environment-specific configurations that automatically apply depending on the environment; see [Environment configurations](docId\:B0Xf87BvPV4oCHxM0kF6y).
- If you use **add-ons** on the site, ensure that you include the `modules` and `modulesbin` folders in the project so that these are published. Publish the *database schema* on the first publish operation *only*.
- Before you deploy, add a wildcard binding to the site in the **Manage Websites** screen. This helps to prevent failures due to URL-dependent code when migrating the database between environments. See the following image, which shows an example of this binding.
  1. Select **Admin > Configuration > Manage Sites**.
  2. Click **Add** and add a wildcard (\*) Host Name.

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/8pIi3xLieCo5yBkYhQjLu_a2008508aa4fde3e2c2176a72160b4ff69b68c74de4df7f0342ea53e338ac892-image.png)

## Deploy code changes between environments

In Optimizely Digital Experience Platform (DXP), manage deployments using the [DXP Management Portal](docId\:O4YrBd-sHXoEQsTLu6v-z).

Optimizely's deployment automation engine performs the following steps when deploying.

1. **Package code from the source environment** – Creates a deployment package of the code in the source environment.

:::hint{type="info"}
- **Note**
  Files with the `.log` extension are not included.
- If a `.txt` file cannot be read, (for example, it is locked by another process), it is skipped.
- Locked files under `*wwwroot\App_Data\` are ignored.
- Everything under `wwwroot\App_Data\Blobs` is excluded (should not be used in Azure).
:::

2. **Create a slot on the target environment** – This slot has the same configuration as the current production slot. Other settings, such as logging to BLOB storage, are also configured according to DXP standards. At this stage, the slot is in a *stopped* state.
3. **Deploy code to the slot** – The code package created in step one is deployed.
4. **Prepare monitoring and extensions** – Extensions for application performance monitoring are installed on the slot and configured according to DXP standards.
5. **Apply configuration transforms** – Any configuration transforms included in the code package matching the target environment are applied on the target. See [Environment configurations](docId\:B0Xf87BvPV4oCHxM0kF6y).
6. **Configure warmup for the target slot** – The deployment engine checks for an `<applicationInitialization>` section in `web.config`; if none exists, it is created. See [Warm up sites](docId\:DlSMeX-axf38oouC5dQLk).
7. **Start the slot and prepare for "Go Live"** – The slot is started and initiates a "swap with preview." The deployment engine monitors the site until it completely starts and warm-up finishes for its instances. The slot scales to the same level as the current production site to handle the production traffic load after the swap.
8. **Validate the site** – A manual "smoke test" is performed to verify that the site works as expected. For this to work, configure your Optimizely site to respond to the slot address. See [Before going live step 1 in the Going live section](docId\:xvdQls3io4LX4U7gr66Q3).
9. **Go Live/Reset** – If the site works as expected, it is swapped into the site's production slot of the current target environment (Preproduction or Production), and the old slot is stopped. If the site in the slot does not behave as expected, the swap is aborted, and the slot site is stopped. The files are saved for troubleshooting or until a new deployment is attempted.

## Related topics

- [Deploy a new CMS site](docId\:RIn0cobbPnEmEafa16av8)
- [Deploy an existing CMS site](docId\:O-u0L3gdPwwJMi0xCFRLL)
- [Deploy an existing Commerce Connect site](docId:8-95xFJ5mAnWvik2jIIhy)
- [Blog post](https://world.optimizely.com/globalassets/images/external-link.png) Blog post: [Setting up Continuous Integration with Azure DevOps and Episerver DXC Service (Optimizely DXP)](https://world.optimizely.com/blogs/stephan-lonntorp/dates/2018/11/setting-up-continuous-integration-with-azure-devops-and-episerver-dxc-service/)
