Guides2 min read
How to move Webflow CMS content into a headless CMS
Export through the API, transform, import with a script, and run it again. The content migration process that avoids retyping anything by hand.
Mitja PakFounder & developer, builds Webflow sites every dayCopying content by hand is slow, and it introduces errors. It also only happens once, while the live site keeps changing. A content migration should be a script you can run as many times as you need.
1. Read everything through the API
CSV exports from the Webflow dashboard work for simple collections, but they flatten references and rich text. The Webflow Data API returns collections, items, field types, and references as structured data, which is what you want to transform.
- Fetch the schema of every collection first, so you know the field types
- Fetch every item, including drafts and archived items, and decide what to keep
- Download every image and file the items reference
2. Map old fields to the new model
Write the mapping down in a table before you write code. Most of the work is in the decisions, not the script.
| Webflow | New CMS | Note |
|---|---|---|
| Plain text, number, date | Same type | Direct copy |
| Rich text | Structured rich text or blocks | Convert HTML, fix embeds and internal links |
| Image | Asset reference | Re-upload, keep alt text and file name |
| Reference / multi-reference | Reference field | Import referenced collections first |
| Option | Enum or reference | Use a reference if editors will add options |
3. Clean while you transform
The transform step is the right place to fix old problems.
- Rewrite internal links to new URLs
- Strip inline styles and empty paragraphs from rich text
- Split long rich text into blocks where the layout calls for it
- Fill missing SEO fields with sensible defaults, and flag them for review
4. Import in dependency order
Import collections that others point to first, like authors and categories, then the items that reference them. Keep a lookup from old Webflow IDs to new IDs so references resolve. Make the import idempotent: running it twice should update entries, not duplicate them.
5. Verify, then repeat at cutover
Compare item counts per collection. Spot-check the 20 most visited items field by field. Then, on cutover day, freeze content in Webflow, run the script one last time, and you're current.
- Webflow migration to Next.js or Astro →Collections, interactions, localization
Planning a migration?
See the assessment →