Monday, December 23, 2019

How to get sitecore publishing service to work in local

Sitecore Publishing Service

This is a .net core service given by Sitecore to publish content in Sitecore. We have to enable this by using two different packages given by Sitecore.

1. Sitecore Publishing Service: Setting up a separate service in IIS for Sitecore Publishing Service.

2. Sitecore Publishing Module: Configuring Sitecore Instance to publish using the Sitecore publishing Service.

Lets see these steps one by one,

How to set Sitecore Publishing Service UP and running in our local?

Step 1: Download the Sitecore Publishing Service from Sitecore.

Url: https://dev.sitecore.net/Downloads/Sitecore_Publishing_Service.aspx

Download the Sitecore Publishing Service 4.2 package from sitecore website.

You will get a zip file with the following in it.


This is a .net core app service package. We have to create a app service in IIS and map that to the content of this package. Sitecore have provided some simple commands to configure the connection strings in this and create it as a IIS app service.

Step 2: Create a folder in your local machine and copy the contents inside the package downloaded into that folder.

Now open powershell and give the following commands,

Navigate to the folder created,

$ cd C:\<your folder name>>
$ .\Sitecore.Framework.Publishing.Host.exe configuration setconnectionstring core '<core database connection string>'
$ .\Sitecore.Framework.Publishing.Host.exe configuration setconnectionstring master '<master database connection string>'
$ .\Sitecore.Framework.Publishing.Host.exe configuration setconnectionstring web'<web database connection string>'

After running these commands, you can see the connection strings getting added in a json file as below,

Path: <your folder name>\config\global


Step 3: Now run the below command to set a default publishing service in your IIS.

$ .\Sitecore.Framework.Publishing.Host.exe iis install

This will install a default publishing service instance in local IIS. We can customize this in the way we wanted i,e., we can give your own app pool name, and app service name for creating the publishing service. But, these are optional.

With this we are all set to have the publishing service UP and running.

How to configure sitecore instance to publish using the Sitecore Publishing Service.

Now lets see the steps to configure sitecore publishing service to be used for the local sitecore instance for publishing.

Step 1: Download the package from sitecore dev.

Url: https://dev.sitecore.net/Downloads/Sitecore_Publishing_Service_Module.aspx

Download the right version of module for your local sitecore instance.

Install this module into your sitecore instance.


Step 2: Once the package is installed, you will get the below config files copied in you local instance under the folder,

App_Config\Modules\PublishingService


Now open the Sitecore.Publishing.Services.config and do the following changes,

Update the PublishingService.UrlRoot, and PublishingService.ProxyAddress to suite your local instance.



Now, in case if you have multiple publishing target or a custom publishing target other than the sitecore default publishing target following the below link to know how to configure them,

Publishing Targets

No comments: