Skip to content
Sitecore

XP to XM Cloud Phase 3: Content and Template Migration

This phase typically takes 4-8 weeks and covers exporting content from XP, importing to XM Cloud, template refactoring, and serialization migration.

Option A: Use Official XM to XM Cloud Migration Tool

Sitecore provides a dedicated migration tool (GUI and CLI) for moving content, media, and user data from XM/XP to XM Cloud. Download from developers.sitecore.com/downloads/xm-cloud.

Key features:

  • Supports XP/XM versions 9.1 and later
  • GUI and CLI interfaces available
  • Built on Google Protocol Buffers (Protobuf) for fast transfers
  • Handles content, media, and user data (not front-end layouts/renderings)

Option B: Custom Export (Sitecore PowerShell Extensions)

Terminal window
# Export content items
$items = Get-ChildItem -Path "master:/sitecore/content/MyProject" -Recurse
$items | Export-Item -Path "C:\export\content.xml"
# Export media items
$media = Get-ChildItem -Path "master:/sitecore/media library/MyProject" -Recurse
$media | Export-Item -Path "C:\export\media.xml"

Use the XM to XM Cloud Migration tool to import content into your XM Cloud environment. The tool orchestrates the migration through a middleware layer that handles data mapping and transfer.

Alternative: Use Sitecore CLI serialization for items already serialized to disk:

Terminal window
dotnet sitecore ser push

Review templates for headless compatibility:

Remove XP-specific fields:

  • xDB-related fields (tracking, analytics)
  • MVC-specific presentation settings

Add datasource templates for JSS components:

// Old XP approach: Controller rendering, no datasource
public ActionResult Hero()
{
return View(RenderingContext.Current.Rendering.Item);
}
// New XM Cloud: JSS component with datasource
// Template: /sitecore/templates/MyProject/Hero
// Fields: Headline, Subheadline, BackgroundImage, CTALink

From TDS (Team Development for Sitecore):

  • TDS uses .item files (proprietary format)
  • Manual migration: Export TDS items to Sitecore, serialize with SCS
  • No automated tool from TDS to SCS

From Unicorn:

  • Unicorn uses YAML (similar to SCS, but not identical)
  • Migration: SCS can read Unicorn YAML with minor adjustments (field names may differ)

From SCS (Sitecore Content Serialization):

  • No migration needed — Already in SCS format
  • Update module.json paths if needed
  • Item counts match — XP vs. XM Cloud (use /sitecore/content statistics)
  • Template inheritance intact — No broken inheritance chains
  • Media library complete — All assets present (file count and total size)
  • Datasource relationships preserved — All rendering datasources exist
  • No broken links — Run internal link checker
  • Publishing works — Test publish all content items

Gotcha #1: Media items with special characters fail import

  • Solution: Sanitize filenames before export (remove :, #, %, etc.)

Gotcha #2: Large media library (> 10GB) times out

  • Solution: Batch import (1,000 items at a time)

Gotcha #3: Workflow states don’t migrate

  • Solution: Reset all items to “Draft” or “Published” state before import