HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Deployment

Describes how to move your solution from your local development environment, to a production-like environment in the cloud, or on-premises.

When developing an Optimizely Content Management System (CMS) site with the Visual Studio integrations, the site will use IIS Express, SQL Server Express, and LocalDB, to make it easy for developers to build and test sites.

Deployment scenarios

During development, you will eventually want to deploy your solution to a production-like environment, to verify that everything works. In reality, you normally plan already from start how the website will be deployed, maintained, and hosted. Cloud-based options are great for optimizing resource usage. Depending on the choice for hosting and maintenance for the site, specific development considerations may apply. See Planning deployments.

Some common deployment scenarios include:

  • Cloud-based – Deploy to Azure Web Apps.
  • Cloud-based manged service – Deploy to Optimizely Customer-Centric Digital Experience (DXP).
  • Containerized hosting – Deploy to for example Kubernetes.
  • Non-cloud – Deploy to Microsoft IIS and Windows Server.

Deploy to Azure Web Apps

In this scenario you deploy your site to an environment based on Microsoft Azure cloud components. Prior to deploying your site, you need to create and configure the various Azure components needed, including a Web App, an SQL Database, a Service Bus, and a BLOB storage.

See Deploying to Azure Web Apps.

Deploy to DXP

Cloud-based solutions are powerful when scaling for site availability. However, managing the required components can be quite challenging. With Optimizely Digital Experience Platform (DXP), you let CMS manage the cloud components for you. You can choose to either deploy yourself through the CMS self-deployment portal, or let CMS do the deployment.

Deploy to Microsoft Windows Server

You can also run your site "non-cloud" using Microsoft IIS and Windows/SQL Server. As a first step when moving towards a production-like environment, you can set up a local environment with IIS and deploy to that, to get an understanding of how it works. Moving to a full version of IIS also requires enabling of some features.

When deploying, you create the artifacts for the site, the database, and the application data, and then use XCOPY to move the files to the target server. See Deploying to Windows servers.

Create an empty database

Included in an CMS installation is a cmdlet called Initialize-EPiDatabase. You can use this if you have been playing around with CMS, and want to create a new fresh database for your site. The cmdlet installs all database schemas that are included in the installed NuGet packages (both CMS and Commerce). Run the command in the Package Manager Console in Visual Studio, and a database is created in your App_Data folder.

📘

Note

When you create a new database, your old data is overwritten. If you want to keep your data, you can use CMS's export/import feature. This lets you define which items you want to export to an XML file. Data from the XML can then be imported to your new database.

You can also create a database directly on a remote server:

  1. Create an empty database on the SQL Server.

  2. Configure your connection string in your web.config to point to your empty database.

  3. Run the following command in the Package Manager Console:

    Initialize-EPiDatabase -sqlFilePattern:c:\\data\\mysql.sql -connectionString:MyConnectionString