
This guide is part of our Headless CMS resource hub: what headless is, when it's worth it, choosing a platform, headless commerce and step-by-step migration guides.
This guide is part of our WordPress resource hub: costs and hosting, the block editor, plugins, SEO and speed, security, maintenance, WooCommerce, development, comparisons and migrations.
Key Takeaways
- No plugin moves a WordPress site to Contentful in one click; a migration is a scripted export, transform and import that you run several times before cutover.
- Content modeling and converting WordPress HTML into Contentful Rich Text take most of the effort, especially with shortcodes and page builder layouts.
- Contentful has no pages or URLs of its own, so the new front end must reproduce every slug or 301-redirect it.
- Going from Contentful back to WordPress is usually simpler: export the space as JSON, render Rich Text to HTML, and create posts through the WordPress REST API or WP-CLI.
- A good migration agency shows you a content model, a redirect map, dry-run results and a rollback plan before anything goes live.
To migrate WordPress to Contentful, you design Contentful content types that match your WordPress posts, pages and custom fields, export the WordPress content as JSON through the REST API, convert the HTML into Contentful Rich Text, upload media as assets, import everything with the Content Management API, then launch a new front end that keeps every URL or redirects it. Moving from Contentful to WordPress reverses that path and is usually less work, because WordPress accepts HTML.
This guide covers both directions, the tools involved, the SEO steps that protect your rankings, and what to ask an agency if you hire one.
Should You Move to Contentful at All?
Contentful is a headless CMS: it stores structured content and delivers it as JSON through APIs. It does not render a website. You build the front end separately, often in Next.js, Astro or Nuxt, and host it yourself. That split brings real benefits and real costs.
| Good reasons to move | Reasons to stay on WordPress |
|---|---|
| The same content feeds a website, apps and other channels | One marketing website is the only channel |
| A development team already works in a JavaScript framework | No in-house developers; editors rely on themes and plugins |
| You need strict structured content, many locales and editorial workflows | Editors want visual page building with immediate preview |
| Plugin sprawl and PHP maintenance have become the bottleneck | Budget does not cover a separate front end, hosting and ongoing development |
If you are still comparing options, read our headless vs traditional CMS breakdown and the Strapi vs Contentful vs Sanity comparison before committing.
What Changes When You Leave WordPress
In WordPress, the CMS is the website. With Contentful, the CMS is one service among several:
- Content Management API (CMA): writes content. Your migration scripts use it.
- Content Delivery API (CDA) and GraphQL API: read published content for the front end.
- Content Preview API: reads drafts for preview builds.
- Front end and hosting: your own application renders pages and deploys to a host such as Vercel or Netlify.
Plugins do not carry over. Forms, search, redirects, sitemaps, SEO tags and structured data all become code or separate services. Budget for rebuilding them as well as for moving content.
Step 1: Audit WordPress and Design the Content Model
List every content type you have: posts, pages, custom post types, taxonomies, ACF or other custom fields, menus and reusable blocks. Then map each to a Contentful content type. A blog post might become:
| WordPress source | Contentful field | Type |
|---|---|---|
| post_title | title | Short text |
| post_name | slug | Short text, unique |
| post_content | body | Rich Text |
| post_excerpt | excerpt | Long text |
| Featured image | heroImage | Media (asset link) |
| Author | author | Reference to Author entry |
| Categories and tags | categories | References to Category entries |
| Yoast or Rank Math title and description | seoTitle, seoDescription | Short text |
| post_date | publishDate | Date and time |
Plan around Contentful's technical limits: 50 fields per content type, 200,000 characters per Rich Text field, 1,000 links per entry, and asset uploads of 50 MB on free plans. Your plan's entitlements may be lower than these, so check them before you design. Define the model as code with the Contentful CLI's migration scripts so you can recreate it in a test environment.
Step 2: Export Content From WordPress
The WordPress REST API gives cleaner data than the XML export. This Node.js script (Node 18 or newer, saved as an .mjs file) pages through all published posts:
const base = 'https://example.com/wp-json/wp/v2/posts';
const posts = [];
for (let page = 1; ; page++) {
const res = await fetch(`${base}?per_page=100&page=${page}&_embed`);
if (!res.ok) break;
posts.push(...(await res.json()));
const totalPages = Number(res.headers.get('X-WP-TotalPages'));
if (page >= totalPages) break;
}
console.log(`Exported ${posts.length} posts`);
Repeat for pages, media, categories, tags, users and each custom post type exposed to the REST API. Note that content.rendered is the HTML after shortcodes and blocks have run; if you need the raw block markup, request context=edit with an authenticated user.
Step 3: Convert HTML to Rich Text and Move Media
This is the hardest step. Contentful Rich Text is a JSON document of typed nodes (paragraphs, headings, lists, links, embedded entries and assets), not an HTML string. Options:
- Convert HTML to Markdown, then use Contentful's open-source
rich-text-from-markdownpackage. - Use a community HTML-to-Rich-Text parser. These convert node by node and can produce documents Contentful rejects, so validate every result.
- Map complex layouts, such as page builder sections, galleries and embeds, to separate content types referenced from the page instead of forcing them into Rich Text.
For media, download each file, upload it as a Contentful asset, and keep a lookup table from old WordPress URL to new asset ID so you can rewrite image links inside the body.
Step 4: Import With the Management API
Import in dependency order: assets, authors and categories first, then the entries that reference them. A minimal example with the contentful-management JavaScript library:
import { createClient } from 'contentful-management';
const client = createClient({ accessToken: process.env.CMA_TOKEN });
const space = await client.getSpace(process.env.SPACE_ID);
const env = await space.getEnvironment('master');
const entry = await env.createEntry('blogPost', {
fields: {
title: { 'en-US': 'Post title' },
slug: { 'en-US': 'post-title' },
},
});
await entry.publish();
Field values are keyed by locale, so use your space's default locale code. The CMA allows 7 requests per second on free plans and 10 on paid plans, so throttle and retry on HTTP 429 responses. For bulk loads, the Contentful CLI's contentful space import command accepts a JSON file in the same format as contentful space export. Run the whole pipeline against a sandbox environment until a full run finishes with no errors.
Step 5: Protect SEO and Cut Over
- Keep URLs. Build front-end routes that reproduce your WordPress permalinks. Where a URL must change, add a page-to-page 301 redirect.
- Carry over metadata. Import SEO titles, descriptions and canonical URLs from your SEO plugin, and render them in the new templates.
- Rebuild what plugins did. XML sitemap, robots.txt, structured data, RSS feed, breadcrumbs and image alt text.
- Compare before and after. Crawl both sites and compare status codes, titles, headings, canonical tags and internal links for your top pages.
- Launch reversibly. Lower the DNS TTL beforehand, keep WordPress available read-only for a few weeks, and watch Google Search Console's Pages report and 404s daily.
Moving the Other Way: Contentful to WordPress
Teams move from Contentful back to WordPress when they no longer have developers to maintain a custom front end, when editors want visual page building, or when plan limits and costs outgrow the value of headless. The process:
- Export the space.
contentful space export --download-assetswrites a JSON file with content types, entries, assets, locales, webhooks, roles and editor interfaces, and saves the asset files locally. - Map content types. Blog posts map to posts, landing pages to pages, and other types to custom post types with custom fields. References to authors and categories become WordPress users and terms.
- Render Rich Text to HTML. Contentful's official
rich-text-html-rendererpackage converts Rich Text documents to HTML. Add custom renderers for embedded entries and assets, which do not output anything useful by default. - Import media first, with WP-CLI's
wp media importor the REST API, and record the new attachment IDs and URLs. - Create posts through the REST API, authenticated with an application password, or with WP-CLI's
wp post create. Set slugs to match the old front end's URLs. - Rebuild page layouts as block patterns or theme templates, then redirect any URL that changed and resubmit the sitemap.
If several locales exist in Contentful, decide on a multilingual plugin before importing, because each locale becomes its own post or translation in WordPress. Our article on migrating a custom CMS to WordPress covers the planning side in more depth.
How to Choose a WordPress and Contentful Migration Agency
Whichever direction you are going, ask an agency for these before signing:
- A content inventory and proposed content model, field by field.
- The conversion approach for shortcodes, page builder layouts, embeds and Rich Text, with sample output from your own content.
- A scripted, repeatable migration with dry runs in a sandbox, not manual copy and paste.
- A complete redirect map and an SEO parity check on titles, canonicals, structured data and internal links.
- Editor training and documentation for the new CMS.
- A rollback plan and at least a few weeks of post-launch monitoring.
Be wary of fixed quotes given before anyone has looked at your content, and of any promise of a one-click migration. Our list of Contentful development agencies compares specialists, and eSEOspace handles both directions as part of its website migration services.
Frequently Asked Questions
Is there a plugin that migrates WordPress to Contentful automatically?
No plugin handles the whole move. Contentful provides the CLI import and export tools and a Management API, but you still need scripts that map WordPress fields to your Contentful content types and convert post HTML into Rich Text. Plan for a scripted process that you run several times in a sandbox before the final import.
How do I convert Contentful to WordPress?
Export the Contentful space with the CLI, including assets. Convert Rich Text fields to HTML with Contentful's rich-text-html-renderer package, adding renderers for embedded entries and assets. Import media into WordPress, then create posts, pages and custom post types through the REST API or WP-CLI, keeping the same slugs or adding 301 redirects.
Will I lose Google rankings when migrating between WordPress and Contentful?
You can keep rankings if the new site serves the same URLs, or 301-redirects each changed URL to its closest equivalent, and carries over titles, descriptions, canonical tags, structured data and internal links. Crawl the old and new sites, compare them before launch, and watch Search Console daily for 404s and indexing drops for several weeks afterwards.
How long does a WordPress to Contentful migration take?
It depends on content volume, how many content types and custom fields you have, and whether the front end is built from scratch. A small blog with a simple model can move in a few weeks. Sites with many custom post types, page builder layouts, locales and a full front-end rebuild usually take a few months, mostly spent on modeling, conversion and testing.
Do I need a developer after moving to Contentful?
Yes. Contentful stores and delivers content but does not render a website. You need developers to build and maintain the front end, add new content types, handle forms, search, SEO tags and integrations, and update framework dependencies. If you do not have that capacity, WordPress or another traditional CMS may be the better fit.










