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.
Step 1: Export Content from XP
Section titled “Step 1: Export Content from XP”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)
# 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"Step 2: Import into XM Cloud
Section titled “Step 2: Import into XM Cloud”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:
dotnet sitecore ser pushStep 3: Template Refactoring (if needed)
Section titled “Step 3: Template Refactoring (if needed)”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 datasourcepublic ActionResult Hero(){ return View(RenderingContext.Current.Rendering.Item);}
// New XM Cloud: JSS component with datasource// Template: /sitecore/templates/MyProject/Hero// Fields: Headline, Subheadline, BackgroundImage, CTALinkStep 4: Serialization Migration
Section titled “Step 4: Serialization Migration”From TDS (Team Development for Sitecore):
- TDS uses
.itemfiles (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.jsonpaths if needed
Step 5: Validation Checklist
Section titled “Step 5: Validation Checklist”- Item counts match — XP vs. XM Cloud (use
/sitecore/contentstatistics) - 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
Known Gotchas
Section titled “Known Gotchas”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