How to move website content between platforms with Claude Code
How to move website content between platforms with Claude Code

Claude Code can move content from one platform to another by doing the tedious middle of the job: reading an export, converting each post and page into the new platform's format, rewriting internal links and image paths, carrying over titles and meta descriptions, and checking that nothing went missing. You still decide how the old content maps to the new structure, and a person checks samples and counts before anything goes live.
The method below works for WordPress to a static site, one CMS to another, or a site builder to a headless CMS. It assumes you work in git, on a copy, with the export files kept untouched. If you're replacing the whole site, design and hosting included, start with our overview of rebuilding a website with Claude Code. This guide covers only the content.
Key Takeaways
- A content migration has three parts Claude Code handles well: getting the content out, converting it, and checking the result against the original. The content model is a human decision.
- Keep the raw export in its own folder and never edit it. Every conversion should be a script you can rerun from that export.
- WordPress's built-in export creates a WXR file with posts, pages, custom post types, comments, custom fields, categories, tags, custom taxonomies and users. Media files come across only if the importer is told to download attachments.
- Webflow's code export does not include CMS content, so blog posts need another route, such as Webflow's Data API.
- Check the second and third converted pages, not just the first, and reconcile counts: items exported, converted, imported and redirected.
- Import into the new platform as drafts where it supports them, and have a person approve before publishing.
What "content" includes
Most migrations go wrong on the parts nobody listed. Before any prompt, agree on what counts as content for this job.
| Item | Easy to forget because |
|---|---|
| Posts, pages and custom types (team members, case studies, locations) | Custom types often live in plugins or CMS collections, not the main post list |
| Titles, meta descriptions, canonicals, robots settings | They sit in an SEO plugin or page settings, not in the body |
| Categories, tags, authors, publish dates | Archive pages and bylines depend on them |
| Images and files, with alt text | Bodies link to them, but the files live elsewhere |
| Internal links inside body text | They point at old URLs that may change |
| Embeds, shortcodes, forms | They render on the old platform and turn into raw code on the new one |
| Structured data | It may be generated by a plugin and vanish when the plugin does |
Step 1: get a complete export into git
Pick the most complete export route the source platform offers, and save the result in a folder such as export/ that no script ever writes to.
| Source | Documented export routes | Watch for |
|---|---|---|
| WordPress | Tools > Export (a WXR file), the REST API, WP-CLI (wp post) | SEO plugin fields and page-builder layouts may not convert cleanly |
| Webflow | The Data API ("an extensive set of RESTful endpoints") or the Webflow CLI, which can manage CMS content | Code export excludes CMS, ecommerce and localized content |
| HubSpot CMS | The remote HubSpot MCP server, which can create, edit and publish blog posts and pages | Its page tool asks for confirmation before creating or publishing |
| Headless CMS (Sanity, Contentful, Storyblok, Strapi) | Each vendor's own API, CLI or MCP server | Storyblok says its MCP is for one-off changes and recommends its CLI for repeatable, high-volume work |
If no export exists, Claude Code can write a crawler that saves each public page as HTML. A crawl only sees what's public, so check it against your sitemap and analytics before trusting it. Our guide to using Claude Code on WordPress covers WP-CLI and why some WordPress content lives in the database rather than in files.
Example prompt: Read the WXR file in export/. Don't change anything. Report how many items there are of each post type and status, which custom fields appear, which shortcodes appear in bodies, and how many attachments are referenced.
Check: the counts match what the old admin shows. A person reviews: anything in the report nobody expected, such as a forgotten custom post type or private posts.
Step 2: decide the content model as a person
The content model is how old fields map to new ones. Claude Code can draft the mapping, but you approve it because it encodes business decisions: which old categories merge, what happens to tags, whether author pages survive, which thin pages are dropped.
Example prompt: Use plan mode. Propose a mapping from the old fields to the new CMS fields in a table: old field, new field, transformation, and items that won't fit. Don't write any code yet.
Save the approved mapping in the repository, and add one line to your project's CLAUDE.md pointing at it, so every later session works from the same decisions. Our guide to writing a CLAUDE.md for a website shows what belongs in that file.
Step 3: convert with a script, then read the output
Ask for a conversion script that reads only from export/ and writes to a separate output folder. A script can be rerun after every fix. A chat session that edits 400 files by hand can't.
Example prompt: Write a script that converts every published post in export/ into the new format, following mapping.md. Convert shortcodes listed in the mapping; leave any other shortcode in place and list it in a report. Run it on five posts and show me the output files.
Then look at the output yourself, and look past the first file. When we rebuilt eseospace.com, a script replaced the wrong container, so new posts carried the template post's text. The first page looked fine. The lesson we wrote down: check the second page a script produces, not just the first. Pick samples on purpose: the longest post, one with tables, one with embeds, one with an unusual character in the title.
Check: the converter's report lists every item it skipped or partly converted, with a reason. A person reviews: the sample files side by side with the live old pages.
Step 4: carry over media and rewrite links
Images and internal links break in quiet ways. A body can still say /wp-content/uploads/… after the uploads folder is gone, and a link can still point at an old URL that now redirects.
- Have Claude Code list every media file referenced in the content, download or copy each one, and record old path to new path.
- Rewrite image paths in bodies from that record, keeping alt text. Report images that have no alt text rather than inventing it during the migration; writing alt text is a separate job with its own review.
- Rewrite internal links to point straight at final new URLs, so visitors don't pass through redirects on every click.
- Rerun the link check after every change to the converter.
Example prompt: Scan the converted output for links and image paths that point at the old domain or old URL patterns. List each with the file and line. Don't fix anything yet.
Check: zero references to the old domain except ones you chose to keep, and every image path returns a file.
Step 5: compare metadata against the original
A parity check compares old and new versions of each page on the things search engines read. Ask Claude Code to write one for your migrated content: title, meta description, canonical, robots setting, H1, structured-data types and publish date.
Example prompt: For every migrated item, compare old and new title, meta description, canonical, robots, H1 and structured-data types. Output a CSV of differences only, with the URL and both values.
On eseospace.com, the first parity run found differences caused by relative URLs. After one fix there were zero differences across all 217 pages checked. A "zero differences" result still needs a person to confirm the script compared real values, not two empty fields. If it reports nothing, open three pages and check by eye.
Step 6: import as drafts and review
Many platforms have a draft state, and you should use it. The WordPress REST API, for example, accepts a post status of publish, future, draft, pending or private. If you're importing into WordPress with its own importer, author mapping and the "Download and import file attachments" option are choices you make on the import screen.
If you connect Claude Code to the new CMS through an MCP server, use a test space or environment first, and give the connection only the access the job needs. Our overview of MCP servers for website teams covers setup and the risks of write access. Anthropic notes that it "does not security-audit or manage any MCP server", so you are trusting the vendor's server.
A person reviews: a sample of drafts in the new platform's own preview, on desktop and mobile, before anything is published.
Step 7: redirects and the final count
Every old URL that changes needs a permanent redirect to its closest new page. Google recommends "HTTP permanent redirects if possible, such as 301 and 308". Build and test the rules with our guide to building a redirect map with Claude Code, and see our 301 redirect map guide for the method itself.
Then reconcile. Ask Claude Code for one table: items in the export, items converted, items imported, items deliberately dropped, and old URLs with a tested redirect. The numbers should add up. Any gap is a page that disappeared without anyone deciding it should.
| Count | Should equal |
|---|---|
| Exported items | Converted plus deliberately dropped |
| Converted items | Imported items |
| Old URLs that changed | Redirect rules that tested correctly |
| Media files referenced | Media files present on the new platform |
What can go wrong, and the check for each
- Edits made in the wrong place. If someone fixes a typo in the converted output and the converter runs again, the fix disappears. Make content fixes in the converter or the mapping, or freeze the output and switch to editing in the new CMS from a set date. On our own site, a publishing step once regenerated every post from source files and deleted edits made only in the built copy.
- Silent skips. A script that "succeeds" but processes nothing. Read the counts every run.
- Garbled prices and symbols. Text with dollar signs or special characters can be mangled by replacement code. Search the output for prices you know.
- Old content treated as instructions. Old pages are untrusted input. A comment or hidden text could contain instructions aimed at an AI agent. Review the commands Claude Code proposes, and don't let a migration session deploy.
- Facts that changed during the project. If the phone number or prices change mid-migration, update them once in the new source, using a site-wide find-and-replace routine.
Conclusion
Moving content with Claude Code works when you treat it as a pipeline, not a chat: an untouched export, an approved mapping, a rerunnable converter, a parity check, drafts, redirects and a count that adds up. Claude Code writes and runs those pieces quickly. People decide the content model, read the samples and approve the launch. If you want a team to plan or run the move, see our website migration services. More guides are in our Claude Code Guide.
Frequently asked questions
Can Claude Code log into my old CMS and copy everything?
It can work through a platform's API, CLI or MCP server once you connect one, and with the Chrome integration it can use sites you're signed into. For bulk content, an export file or an API is more reliable and easier to check than clicking through an admin. Keep credentials out of prompts and project files.
Will migrated content keep its rankings?
No one can promise that. Google's site move guidance recommends permanent redirects, says to "expect temporary fluctuation in site ranking during the move," and notes that for medium-sized sites it "can take a few weeks or more" for new URLs to replace old ones in results. Matching metadata and testing redirects reduces avoidable losses.
Should Claude Code rewrite content while migrating it?
Keep the two jobs apart. Migrate first and confirm parity, then improve content in separate, reviewed changes. Mixing them makes it impossible to tell whether a problem came from the move or the rewrite.
How long does a content migration take?
It depends on the number of content types, how messy the old content is, and how fast people can review samples. The conversion itself is rarely the slow part. Decisions and review usually are.
What if the new platform has no draft state?
Import to a staging copy or a test environment instead, review there, and promote only after approval. Never test an import against the live site.
Put this into action with eSEOspace
We help businesses grow with seo, geo & aeo that actually performs. Explore the services behind this guide:
Get a FREE Audit
We'll perform a comprehensive SEO, AEO, GEO & CRO audit of your website — completely free — and show you exactly how to outrank your competitors.
Don't have a site yet? Get in touch →
Get a FREE GEO/AEO/SEO Audit
We'll analyze your site's SEO, GEO, AEO & CRO — completely free — and show you exactly how to get found across Google and AI answers.
Don't have a site yet? Get in touch →
Great — your audit is on the way!
We'll send your free SEO/GEO/AEO/CRO audit within the next few hours. Where should we send it?
You're all set! ✓
Your free audit is being prepared — check your inbox in the next few hours. Talk soon!
On this page
- Key Takeaways
- What "content" includes
- Step 1: get a complete export into git
- Step 2: decide the content model as a person
- Step 3: convert with a script, then read the output
- Step 4: carry over media and rewrite links
- Step 5: compare metadata against the original
- Step 6: import as drafts and review
- Step 7: redirects and the final count
- What can go wrong, and the check for each
- Conclusion
- Frequently asked questions





