Loading...
Area: Optimizely CMS
Applies to versions: Latest

Deployment

Recommended reading 

When developing an Episerver site with the Episerver 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. This topic describes how to move your solution from your local development environment, to a production-like environment in the cloud, or on-premise.

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: 

Deploying 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 how to do this.

Deploying to Episerver DXP

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

See Deploying with DXP and DXP self-deployment guide.

Deploying 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

Creating an empty database

Included in an Episerver installation is a cmdlet called Initialize-EPiDatabase. You can use this if you have been playing around with Episerver, 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 Episerver'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. See Exporting and importing data.

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

Related topics

Do you find this information helpful? Please log in to provide feedback.

Last updated: Oct 19, 2021

Recommended reading