WordPress to Sitecore XM Cloud Migration: An Architect's Blueprint

The WordPress site was fine. That was the problem. It worked well enough that nobody questioned it, until the organization needed three regional sites, a second language, governed publishing, and personalization the marketing team could run without a developer. By then the install had dozens of active plugins, a page builder nobody wanted to touch, and a custom theme where business logic lived inside template files.

This post covers how I approach a WordPress to Sitecore XM Cloud migration (now branded SitecoreAI): what to decide before writing code, how to move content, where AI-assisted tooling helps, and how to protect SEO with a phased rollout.

Why move at all (and when you shouldn't)

WordPress is a good CMS. For a single-brand marketing site with a small team, it's often the right call and I'd tell a client that. The case for SitecoreAI starts when the requirements stop being about publishing pages and start being about running a digital platform.

The drivers I see most often are multisite governance (many brands or regions on one content platform with shared components), workflow and role-based access that holds up in an audit, and moving off self-managed hosting and plugin patching onto a SaaS platform where Sitecore manages the CMS infrastructure. Headless delivery through Experience Edge and GraphQL, with a Next.js front end, gives you CDN-backed delivery and lets the front-end team work independently of the CMS.

Personalization needs a clear-eyed answer. SitecoreAI includes embedded page-level personalization in Pages, based on audience conditions. Deeper behavioral targeting, experimentation and unified customer profiles come from Sitecore Personalize and Sitecore CDP, which are separate products with separate licensing. Integration platforms like Sitecore Connect are licensed separately too. Set those expectations in the first workshop, not the third sprint.

Wordpress vs SitecoreAI.png

Step 1: Assessment and planning

Most migration problems I've cleaned up were planning problems in disguise. Before anyone opens a terminal, answer three questions: what's the business goal (replatform as-is, or redesign at the same time), what's in scope (every page, or only what earns traffic), and what does "done" mean.

Write acceptance criteria up front: content parity rules, redirect coverage, Core Web Vitals targets, accessibility level, and who signs off. Agree on content freeze windows with the editorial team early. They will push back, and the freeze plan needs negotiating, not announcing.

Decide the cutover model now too. A big-bang launch and a phased, proxy-based rollout lead to different architectures, and you can't easily switch halfway through.

Step 2: Audit the WordPress site

The audit is where you find out what the site really is, as opposed to what everyone remembers it being. Inventory pages, posts, custom post types, taxonomies, media, custom fields (ACF is the usual suspect), forms, shortcodes, menus, plugins, SEO metadata from Yoast or Rank Math, and the full URL list including what's indexed in Search Console.

Pull the URL list from three places: the sitemap, a crawl, and analytics. They never agree. The pages that only show up in analytics are the forgotten landing pages that still get paid traffic, and they're exactly what breaks after launch.

Then map structures to Sitecore. An illustrative mapping:

Wordpress to SitecoreAI Mapping.png

For every plugin and custom feature, make one call: migrate, redesign, replace, or retire. A surprising share of plugins exist to patch over something WordPress lacked, like caching, security hardening or redirects. Those mostly retire. The ones with business logic need real design work.

Step 3: Set up the SitecoreAI environment

Provision the project and environments through the Sitecore Cloud Portal and the deploy tooling, set up SSO and roles, and connect your repository so builds deploy through CI/CD rather than from someone's laptop.

Then design the content architecture before migrating a single item. Create site collections and sites, a base page template carrying SEO and navigation fields, page templates per content type, and datasource templates per component. Use inheritance aggressively. The fastest way to make content migration painful is to build templates ad hoc while the migration scripts are already running.

On the front end, start from the current Next.js starter using the Content SDK (the successor to JSS for new projects), and serialize your templates and renderings with Sitecore Content Serialization so they're in source control. Content items stay out of serialization, except reference data you genuinely need in every environment.

SitecoreAI.png

Step 4: Data migration and content transfer

This is where most of the effort goes, and where shortcuts hurt most.

4.1 SitecoreAI Pathway

Sitecore introduced Pathway as an AI-assisted migration capability for moving existing sites into SitecoreAI. As I understand the publicly described workflow, it analyzes an existing site, helps map its content and structure to SitecoreAI templates and components, and produces output you review before it goes live. Check the current Pathway documentation for which sources it supports, whether WordPress is among them, and what it does with structured fields versus rendered pages.

Treat its output as a first draft. Don't expect it to reproduce plugin behavior, shortcode logic or ACF relationships. Validate a sample field by field before running at volume.

SitecoreAI Pathway.png

4.2 Exporting WordPress content as XML

The built-in WordPress export (Tools → Export) produces a WXR file, which is RSS-based XML with WordPress namespaces. Each piece of content is an <item>:

<item>
  <title>Annual Partner Summit</title>
  <link>https://example.com/events/annual-partner-summit/</link>  <wp:post_id>482</wp:post_id>
  <wp:post_type><![CDATA[event]]></wp:post_type>
  <wp:status><![CDATA[publish]]></wp:status>
  <wp:post_name><![CDATA[annual-partner-summit]]></wp:post_name>
  <content:encoded><![CDATA[<p>Join us...</p>[gallery ids="12,15"]]]></content:encoded>     <category domain="category" nicename="events"><![CDATA[Events]]></category>  <wp:postmeta>
    <wp:meta_key><![CDATA[event_date]]></wp:meta_key>
    <wp:meta_value><![CDATA[20260614]]></wp:meta_value>
  </wp:postmeta>
</item>

A few things trip people up. Media items are their own <item> entries with post_type of attachment, linked to posts by ID, so you need to resolve relationships yourself. ACF data lands in wp:postmeta as raw values: dates as Ymd strings, relationship fields as serialized PHP arrays, images as attachment IDs. Yoast metadata is in postmeta too (keys like _yoast_wpseo_title). And content:encoded contains unrendered shortcodes, as in the gallery above, so whatever you migrate has to decide what each shortcode becomes.

Validate the export: compare counts per post type with the WordPress admin, filter out drafts and private items, and check large exports weren't truncated.

4.3 AI-assisted migration with a Claude Skill and Sitecore MCP

This is the approach I find most useful for the messy middle: content that's too varied for a rigid script but too voluminous to rebuild by hand. To be clear about what's verified and what's proposed: Sitecore provides an MCP server that exposes SitecoreAI operations to MCP-compatible AI clients. Which operations are available (reading, creating or updating content and pages, for example) depends on the server version and your permissions, so list the tools in your own environment rather than assuming. The workflow around it below is my proposed design, not a Sitecore product feature.

Migration workflow.png

The Skill is the part that makes this repeatable. It's a folder with a SKILL.md that holds the rules every run must follow, so you're not re-explaining the content model in every session. An excerpt from the kind of Skill I'd write:

# WordPress → SitecoreAI migration rules

## Mapping
- post_type "event" → template "Event Page" under /Home/Events
- meta event_date (Ymd) → field "Event Date" (Sitecore date format)
- yoastwpseo_title → "Meta Title"; if empty, use <title>; never invent one
- category nicename → Taxonomy item lookup by name; if missing, STOP and report

## Transforms
- [gallery ids="..."] → Gallery component, images resolved by attachment ID
- Unknown shortcode → leave in place, add to report, do not guess

## Safety
- Target only the environment named in the run config
- Before creating, look up by source ID stored in field "Legacy WP ID"; update instead of duplicating
- Never publish; leave items in the draft workflow state
- Log: WP ID, Sitecore item path/ID, action, warnings

The "Legacy WP ID" field does a lot of work. It gives you duplicate prevention on re-runs, a trace from every Sitecore item back to its source, and an easy way to build the redirect map later. Add it to your base template early.

Run small batches against a non-production environment. The model handles judgment calls a script handles badly, like splitting a long body into components or cleaning page-builder markup. It shouldn't be trusted blindly. Every batch gets a validation pass, and nothing gets published without an editor approving it through workflow.

On security: give the MCP connection a dedicated account with the narrowest role that works, keep it away from production until the process is proven, and don't put credentials in the Skill. Remember that content passed through the model goes to an external service, so check data handling with your security team before running anything sensitive.

Step 5: Design and component development

Don't recreate WordPress templates one-to-one. Group existing pages into a few real layouts and break those into components: hero, rich text, card grid, CTA banner, accordion. Each component gets a datasource template, and each maps to a Next.js component in your Content SDK app.

Authors build pages in Sitecore Pages, the visual editor for SitecoreAI. It replaces the Experience Editor workflow from XP/XM, so any old habits around Experience Editor customization don't carry over. Test your components in Pages early. A component that renders fine on the live site but is awkward to edit in Pages will generate support tickets for years.

Bake in accessibility (semantic HTML, focus states, contrast) and responsive behavior at the component level. Fixing them per page later is far more expensive.

Step 6: Integrations and functionality

Evaluate each plugin and integration on its own. Forms get rebuilt with Sitecore Forms or a CRM-native embed. Analytics and consent move into the Next.js app. Search becomes Sitecore Search or another service, which is its own project. Authenticated areas need a proper identity design; there's no "members plugin" equivalent.

Custom business logic that lived in functions.php usually becomes a Next.js API route, a serverless function, or a call to an existing enterprise service. Keep API keys server-side and plan for the third-party service being down: timeouts, fallbacks, and logging that tells you which integration failed.

Step 7: SEO, redirects and the phased rollout

URL mapping and 301s

Build a URL map from the audit's combined URL list: old URL, new URL, status (kept, changed, consolidated, retired). Keep URLs identical where you can. It's the cheapest SEO protection there is.

In SitecoreAI, SXA-based headless sites support redirect map items that the Next.js middleware applies; for very large sets, some teams handle redirects at the CDN or edge instead. Either way, test for chains (A → B → C) and loops, and point retired content to the closest relevant page rather than dumping everything on the homepage, which search engines tend to treat as a soft 404.

Carry over titles, descriptions, canonicals and Open Graph data from the WordPress SEO plugin. Generate the sitemap and robots.txt from the new site, add structured data where the old site had it, and resubmit the sitemap in Search Console at launch.

Reverse proxy for a phased migration

Big-bang launches concentrate all the risk on one weekend. A reverse proxy lets you move sections over gradually under the same domain.

reverse proxy.png

The routing table decides which paths go to the new app. You migrate /events/*, flip the rule, monitor, then do the next section. If something breaks, flipping the rule back is your rollback.

None of this comes with SitecoreAI. You build and run it, usually on your CDN or edge platform. The hard parts are the details: cache keys and purge rules for two origins, cookies and consent that must work on both sides, shared header and footer navigation that has to link correctly across both systems during the transition, and making sure WordPress pages don't keep canonicals pointing at old paths. Log which origin served each request so you can trace issues, and monitor 404s and 5xx per origin.

Final cutover is when the routing table defaults to SitecoreAI. Keep WordPress read-only and reachable internally for a few weeks. Someone will ask about a page you forgot.

const WORDPRESS_BASE_URL = “Wordpress URL”;
const MAX_REDIRECTS = 5;

function normalizeWordPressPath(pathname: string): string {
let path = pathname || “/”;
// Remove staging prefix: /staging/5474/...
path = path.replace(/^/staging/\d+(?=/|$)/i, “”) || “/”;
// Remove Sitecore site+locale prefix: /lng-consultancy/en/banking -> /banking
path = path.replace(/^/lng-consultancy/[a-z]{2}(?=/|$)/i, “”) || “/”;

// Optional locale-only fallback: /en/banking -> /banking
path = path.replace(/^/[a-z]{2}(?=/|$)/i, “”) || “/”;
if (!path.startsWith(“/”)) path = /${path};
if (path === “”) path = “/”;
// Add trailing slash for WP page permalinks (not files)
const looksLikeFile = /.[a-zA-Z0-9]+$/.test(path);
if (!looksLikeFile && path !== “/” && !path.endsWith(“/”)) {
path = ${path}/;
}
return path;
}

function buildProxyHeaders(req: Request, wpBase: URL): Headers {
const headers = new Headers();
const passThroughHeaders = [
“accept”,
“accept-language”,
“user-agent”,
“content-type”,
“authorization”,
// intentionally not forwarding cookie
];

for (const h of passThroughHeaders) {
const v = req.headers.get(h);
if (v) headers.set(h, v);
}
headers.set(“x-forwarded-proto”, “https”);
headers.set(“x-forwarded-host”, wpBase.host);
headers.set(“x-forwarded-server”, wpBase.host);
return headers;}
function rewriteLocationHeader(
responseHeaders: Headers,
requestUrl: URL,
wpBase: URL
): Headers {
const headers = new Headers(responseHeaders);
const location = headers.get(“location”);
if (!location) return headers;
try {
const locUrl = new URL(location, wpBase.origin);
if (locUrl.host === wpBase.host) {
headers.set(
“location”,
${requestUrl.origin}${locUrl.pathname}${locUrl.search}${locUrl.hash});
}
} catch {
// ignore invalid location header
}
return headers;
}
async function fetchWordPressWithRedirects(
initialUrl: string,
req: Request,
proxyHeaders: Headers
): Promise<Response> {
const method = req.method.toUpperCase();
const isGetOrHead = method === “GET” || method === “HEAD”;
if (!isGetOrHead) {
// Body must be read once from cloned request
const requestBody = await req.arrayBuffer();
return fetch(initialUrl, {
method,
headers: proxyHeaders,
body: requestBody,
redirect: “manual”,
});
}
let currentUrl = initialUrl;
for (let i = 0; i < MAX_REDIRECTS; i++) {
const res = await fetch(currentUrl, {
method,
headers: proxyHeaders,
redirect: “manual”,
});
const location = res.headers.get("location");
const isRedirect = res.status >= 300 && res.status < 400 && !!location;
console.log(
  '[router] WP fetch ${i + 1}: ${currentUrl} -> status=${res.status}${
    location ?  location=${location} : ""
}'
);
if (!isRedirect || !location) return res;
currentUrl = new URL(location, currentUrl).toString();
}
return fetch(currentUrl, {
method,
headers: proxyHeaders,
redirect: “manual”,
});
}
export default async function handler(req: Request, context: Context) {
const requestUrl = new URL(req.url);
const wpBase = new URL(WORDPRESS_BASE_URL);
const proxyReq = req.clone();
const sitecoreResponse = await context.next();
if (sitecoreResponse.status !== 404) return sitecoreResponse;
try {
const normalizedPath = normalizeWordPressPath(requestUrl.pathname);
const wpUrl = new URL(
${normalizedPath}${requestUrl.search},
wpBase.origin).toString();
const proxyHeaders = buildProxyHeaders(proxyReq, wpBase);
const wordpressResponse = await fetchWordPressWithRedirects(
  wpUrl, proxyReq,  proxyHeaders
);
const responseHeaders = rewriteLocationHeader(
  wordpressResponse.headers,  requestUrl,  wpBase
);
return new Response(wordpressResponse.body, {
  status: wordpressResponse.status,  headers: responseHeaders,
});
} catch (error) {
console.error(“[router] WordPress proxy error:“, error);
return sitecoreResponse;
}
}
export const config = {
path: “/*“,
};

Step 8: Testing and QA

Compare old and new side by side. Crawl both sites and diff the results: URLs, status codes, titles, descriptions, canonicals, H1s. Run visual regression on key templates. Spot-check content on a sample from every content type, not just the homepage.

Pre-production checklist:

checklist.png

QA almost always misses the publishing path. Test that an author's change in Pages actually reaches the live site, including cache behavior, and how long it takes. "It's in the CMS but not on the site" is the most common post-launch ticket I see on headless builds.

FAQ

How long does a WordPress to SitecoreAI migration take?

A typical migration may take roughly 4–12 weeks depending on size, content complexity, integrations, custom functionality and design work. Multi-site enterprise programmes take longer.

Will the migration affect SEO?

A well-planned migration aims to preserve SEO, but temporary ranking fluctuations are common and outcomes can't be guaranteed. URL mapping, 301s, preserved metadata, a fresh sitemap and close monitoring in Search Console and analytics are what protect you.

Will there be downtime?

The goal should be zero or minimal downtime. Parallel environments, a phased proxy rollout and a rehearsed cutover get you close.

Will existing rankings drop because we changed CMS?

Changing CMS doesn't in itself lose rankings. Changed URLs, lost metadata and broken internal links do. A phased proxy rollout keeps unmigrated WordPress URLs live while sections move over, which limits how much changes at once.

Final thoughts

The teams that do well treat this as building a platform, not moving pages. Spend the time on the content model and component architecture, because everything after that, migration tooling included, gets easier or harder based on those decisions. AI-assisted migration earns its place on the varied, messy content, as long as the rules are written down and a person approves what goes live. And unless the site is small, phase it.

If you're planning a similar move, start with the audit and the URL inventory this week. They'll tell you how big the project really is.


Find the right starting
point for AI

Tell us where your team faces delays, manual work, or disconnected systems. We’ll help you explore where AI, automation, or custom software could make a practical difference.

Let's Talk!
Where We Are

Local understanding. Global delivery.

Working with clients across markets, with teams in South Africa, the UAE, and India.

South AfricaSouth Africa
ZACape Town

4th Floor, Mutual Park, Pinelands, Capetown, South Africa - 7405.

UAEUAE
AEDubai

FZCO 421, Dubai Commercity, Dubai, United Arab Emirates.

IndiaIndia
INAmritsar

SCO 6, Floor - 5, Dua Square, Ranjit Avenue, Block - B, Amritsar, Punjab, India - 143002