cubical pattern banner

Sitecore Items: Living Exclusively on the CD Server

KrisLutzHeadshot
Senior Developer
  • Twitter
  • LinkedIn


In the Sitecore ecosystem, content typically originates from the Content Management (CM) server and flows down to the Content Delivery (CD) server. However, there are scenarios where content needs to exist solely on the CD environment, and this can sometimes indicate an issue with the design. In certain cases, though, this requirement may be justified.

Recently, a situation arose where it was necessary to update a field on specific Sitecore items the first time they were loaded on a page. This value needed to be persistent, with the assurance that publishing would not alter or remove the item. The challenge here was that if the item remained on the CM server, any updates made on the CD would be overwritten during the next publish. Conversely, if the item was removed from the CM, it would also be deleted from the CD during publishing. Setting publishing restrictions didn't fully resolve the issue either.

Fortunately, the solution lay in a little-known configuration setting within the Sitecore Publishing Service, which wasn’t documented in the official resources. The key to solving this problem was a specific file found in the publishing service configuration folder:nc.publishing.OrphanedItems.IgnoredItemsAndTemplates.disabled.

The full path would likely be:<SitecorePublishingServiceRoot>\Sitecore\Sitecore.Framework.Plugin.Publishing\Config\sc.publishing.OrphanedItems.IgnoredItemsAndTemplates

In this file you will see a section as follows:

Items Living Excuslively on the CD

IgnoreChildrenOfItemIds – Will not delete/remove any items under the provided ID even though they are removed from the CM.
IgnoreTemplateIds – Will not delete any items using the specified template ID even though they are removed from the CM

It is important to note that if the item exists in the Content Management (CM) system, any updates made in CM will publish out to the Content Delivery (CD) server. As soon as the item is removed from the CM, the item will continue to exist on CD only. This enabled you to create the items on CM, publish them out, enable the config, and delete the items from the CM Server while having them remain on the CD server.