Hide menu Last updated: Oct 03 2017
Area: Episerver DXC Service Applies to versions: Not applicable

Creating a new Commerce site and deploying

This topic describes a simple onboarding deployment scenario where we create a new Commerce website and deploy the application, database and content to the Integration environment in Episerver DXC Service.

When is this applicable?
This is an onboarding scenario for a first-time deployment when you want to set up a site and run development in a cloud environment from the beginning. Through Visual Studio you can deploy an empty database. A new site like this does not require database restore, and the database schema will be created during initial deployment

Before you start

Here we will use Visual Studio with the Episerver extensions and publish profiles, however you can also use other deployment methods.

  • See Requirements for recommended versions of software, tools and services to use when deploying.
  • See Getting started for information needed to deploy.

Note: if not already done, remember to change the default login credentials (admin/store) provided in the Commerce installation, before deploying. See Installing Episerver for more information.

Deployment steps

Follow the steps below to create a new website with CMS, Commerce and Azure, and deploy the code and database with content to the Integration environment in DXC Service. The deployment is done from Visual Studio, using the publishing profiles provided with your DXC Service setup

Note: a Commerce solution consists of two sites, a front-end site and the back-end Commerce Manager site, and two databases, one for CMS and one for Commerce. This means that you need to repeat some deployment steps for each site.

STEP 1. Create a front-end website with Azure

  1. Follow the substeps under the STEP 1 and STEP 2 sections in Creating a new CMS site and deploying to create a site and configure it for Azure, but select Empty project (instead of the Alloy templates). Then add the EPiServer.Commerce package and the EPiServer.Commerce.Azure package. You also need to add EPiServer.Commerce.UI.ManagerIntegration to the front-end site, if you want the UI integration between the front-end and back-end Commerce.


STEP 2. Publish code and database for the front-end site

  1. Right-click on the project in Visual Studio and select Publish. Browse and select the publish profile for the Commerce front-end site.
  2. Click Import to import the settings from the publish profile and click Next.
  3. The next step, Connection, should display the imported publish profile settings, no changes are required here. Click Next (not Publish).

  4. In the Settings step, enter the remote connection string to SQL Database by selecting it under the EPiServerDB section (CMS database).
  5. Enable Update database and click Configure database updates and then clear the option [Auto schema update]. Click Add SQL Script and browse to the EPiServer.CMS.Core NuGet packages (located in [SolutionDir]\packages\EPServer.CMS.Core.N.N.N\tools\ and select EPiServer.Cms.Core.sql. Click Close when done.  


  6. In the Settings step, enter the remote connection string to SQL Database by selecting it under the EcfSqlConnection section (Commerce database).

  7. Enable Update database, click Configure database updates and then clear the option [Auto schema update]. Click Add SQL Script and browse to the EPiServer.Commerce.Core NuGet packages (located in [SolutionDir]\packages\EPServer.Commerce.Core.N.N.N\tools\, and select EPiServer.Commerce.Core.sql. Click Close when done.

  8. The Settings section, before publishing with the added  SQL Database connection strings.

  9. Click Publish to publish the website and databases.
  10. The site should open in a browser when finalized, otherwise you can access it with the default URL for the Integration environment. Verify that the (empty) front-end site is working.

STEP 3. Add Commerce Manager (back-end) to the solution and publish the code

  1. Follow steps 5-8 under Installing Commerce in Installing Episerver, to add Commerce Manager to your solution.
  2. Add the EPiServer.CommerceManager.Azure package to the Commerce Manager site.
  3. Compile the solution.
  4. Repeat sub-steps 1-4 under STEP 2 Publish code... above, this time using the publish profile for the Commerce Manager site. You only need to publish the code since the database was already published with the front-end site.

  5. Click Publish to publish the back-end site, which will open in a browser when finalized.

STEP 5. Verify the website

  1. Go to the default access URL, for example http://[projectNNNNinte].dxcloud.episerver.net.
  2. Log in to the website using the administrator user provided.
  3. Verify that all parts of the site are working.

Note: when starting the site, there might be remaining migration steps. When logged in, navigate to <site-url>/<ui-path>/Commerce/Migrate (if not automatically redirected there), and verify that all migration steps are completed. If there are any issues, correct them and run the incomplete migration steps again.

Note: when the site is started after the publishing has finalized, you might receive a temporary missing license notification, before the cloud license has been retrieved. Also note that it may take up to one hour before the CDN is available for usage, the site may display an error message during this time.

Adding Find 

See Creating a new CMS site and deploying for information on how to add Episerver Find to your solution (not required).

Related topics