Loading component...

Published on June 27, 2024Reading time: 5 min read

The Basic Checklist for Sitecore XM Cloud Content Serialization

Get to know the basic list of items when synchronizing XM cloud content and project code repository through serialization

Loading component...

Related Articles

Sitecore

How to add Last Updated Timestamp in Sitecore sites with Next.js

Improve content debugging by surfacing Sitecore's built-in last-updated timestamp, __Updated field in your headless frontend

March 16, 20261 min read
Blog Card Placeholder
Sitecore

Sitecore Content SDK: Next.js App Router vs Page Router

A side-by-side look at how the Content SDK integrates with each Next.js router — same components, same backend, different patterns.

March 16, 20261 min read

Loading component...

Digital solutions

Learn how to maximize your investment in Sitecore by working with us.

AI solutions

Dominate your industry. Work with us to digitally transform your business.

Fishtank's proprietary project accelerator. Save time and money. Build what matters.

Utilities

Energy

Education

Healthcare

Manufacturing

Professional services

Financial services

Non-profits and associations

About FishtankThe PlaybookSitecore SnackContact us

Solutions

  • Digital solutions
  • AI solutions
  • TIDAL for XM Cloud

About

  • About Fishtank
  • The Playbook
  • Sitecore Snack
  • Contact us

Insights

Work

Industries

  • Utilities
  • Energy
  • Education
  • Healthcare
  • Manufacturing
  • Professional services
  • Financial services
  • Non-profits and associations

Start typing to search...

Effectively Serializing Sitecore XM Cloud Content Through Sitecore Content Serialization

All elements within XM Cloud are items, including content, configurations, and customizations. Certain items are closely linked to developer-provided functionalities. Therefore, it's logical to serialize these items into files within the source code repository to maintain control during development. Here we are discussing the basic checklist for content serialization in XM Cloud.

Sitecore Content Serialization in XM Cloud is able to connect through the Content Management API. It's capable of both retrieving items from XM Cloud in YML format to the local environment and pushing the item representations stored in our local file system to an XM Cloud instance. Serialization helps to synchronize content across different environments like Dev, QA, Staging, etc. It also helps developers to synchronize their environments when using XM Cloud with Docker.

sitecore.json and .module.json files

The Sitecore content serialization configuration encompasses two primary components: the sitecore.json file and files ending with the .module.json extension.

The sitecore.json file is situated in the root directory of your solution and is provided with the XM Cloud Starter Kit. Within this file, we can specify which .module.json files should be included for serialization, define plugins along with their respective versions, and set general serialization preferences.

Screenshot of the Sitecore XM Cloud serialization configuration file.

Within the modules section, all files ending with .module.json in the source folder are considered for determining which items should be serialized and which should be excluded. In the XM Cloud Starter Kit, there is a file renderinghost.module.json which can be referred to as an example. There can be multiple module.json files. Please refer to our other article on adding new items to your XM Cloud serialization.

The Checklist for Serialization

  • Do not include vanilla XM Cloud items. Include only custom-created items.
  • Templates

    /sitecore/templates/Project/

    /sitecore/templates/Feature/

  • Branch Templates

    /sitecore/templates/Branches/Project/

    /sitecore/templates/Branches/Feature/

  • Modules

    /sitecore/system/settings/project

  • Media library folder with the shared and site-related folders only, not including any media assets

    /sitecore/Media Library/Project/ with path and scope rules

  • Custom Layouts

    /sitecore/Layout/Layouts/Project/

    /sitecore/Layout/Layouts/Feature/

  • Rendering Items

    /sitecore/Layout/Renderings/Project/

  • Placeholder Setting

    /sitecore/Layout/Placeholder Settings/Project/

  • Site Collection Root Item

    /sitecore/Layout/Placeholder Settings/Project/

  • Site Root item with rules for media, data, dictionary, settings, and presentation items

    /sitecore/content/<SITE_COLLECTION_NAME>/<SITE_NAME>

A sample module.json file looks like the below. The site collection name and site name can be replaced with your project specific details

  {
    "$schema": "../.sitecore/schemas/ModuleFile.schema.json",
    "namespace": "Project.<SITE_COLLECTION_NAME>",
    "items": {
      "includes": [
        {
          "name": "module",
          "path": "/sitecore/system/settings/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "templatesProject",
          "path": "/sitecore/templates/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "branchesProject",
          "path": "/sitecore/templates/Branches/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "projectMediaFolders",
          "path": "/sitecore/Media Library/Project/<SITE_COLLECTION_NAME>",
          "rules": [
            {
              "path": "/shared",
              "scope": "SingleItem",
              "allowedPushOperations": "CreateOnly"
            },
            {
              "path": "/<SITE_NAME>",
              "scope": "SingleItem",
              "allowedPushOperations": "CreateOnly"
            }
          ]
        },
        {
          "name": "layoutsProject",
          "path": "/sitecore/Layout/Layouts/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "projectRenderings",
          "path": "/sitecore/Layout/Renderings/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "projectPlaceholderSettings",
          "path": "/sitecore/Layout/Placeholder Settings/Project/<SITE_COLLECTION_NAME>",
          "allowedPushOperations": "CreateUpdateAndDelete"
        },
        {
          "name": "tenantRoot",
          "path": "/sitecore/content/<SITE_COLLECTION_NAME>",
          "scope": "SingleItem",
          "allowedPushOperations": "CreateAndUpdate"
        },
        {
          "name": "site",
          "path": "/sitecore/content/<SITE_COLLECTION_NAME>/<SITE_NAME>",
          "rules": [
            {
              "path": "/home",
              "scope": "SingleItem",
              "allowedPushOperations": "CreateOnly"
            },
            {
              "path": "/Media",
              "scope": "SingleItem",
              "allowedPushOperations": "CreateAndUpdate"
            },
            {
              "path": "/Data",
              "scope": "ItemAndChildren",
              "allowedPushOperations": "CreateAndUpdate"
            },
            {
              "path": "/Dictionary",
              "scope": "ItemAndDescendants",
              "allowedPushOperations": "CreateOnly"
            },
            {
              "path": "/Presentation",
              "scope": "ItemAndDescendants",
              "allowedPushOperations": "CreateUpdateAndDelete"
            },
            {
              "path": "/Settings/Site Grouping",
              "scope": "ItemAndDescendants",
              "allowedPushOperations": "CreateOnly"
            },
            {
              "path": "/Settings",
              "scope": "ItemAndChildren",
              "allowedPushOperations": "CreateAndUpdate"
            },
            {
              "path": "*",
              "scope": "Ignored"
            }
          ]
        }
      ]
    }
  }

These are the basic items that should be included for serialization. According to one’s project, the necessary items can be included. Sitecore Content Serialization serves as a powerful tool, allowing developers and content managers to optimize workflows, boost collaboration, and maintain uniformity across environments. Utilizing serialization ensures that your Sitecore projects are scalable, dependable, and straightforward to manage.



Related Links

  • How to Add New Items to Your XM Cloud Serialization
  • Key Concepts and Terms in Sitecore XM Cloud Components (Part 1)
  • Getting Started in Sitecore XM Cloud Components (Part 2)

Solutions

  • Digital solutions
  • AI solutions

Brands

  • TIDAL for SitecoreAI
  • Sitecore Snack
  • The Playbook

Fishtank lore

  • Work
  • Insights
  • About us
  • Contact us

Industries

Utilities
Professional services
Energy
Financial services
Healthcare
Education
Non-profits and associations
Manufacturing
Utilities
Professional services
Energy
Financial services
Healthcare
Education
Non-profits and associations
Manufacturing

2026 @All Rights Reserved. Privacy Policy.

FISHTANK