---
title: "Migrate from WordPress"
description: "A guide to migrating your WordPress website to Prismic with an AI agent, and a reference for how WordPress concepts map to Prismic."
category: "concepts"
audience: developers
lastUpdated: "2026-10-01T21:55:58.000Z"
---

This guide helps you and your AI agent migrate a WordPress website to Prismic. It maps WordPress concepts to Prismic and explains how to export WordPress content.

# What to expect

Migrating from WordPress to Prismic is done in two steps:

* **Migrating your content** with an AI agent. See [Migrate with AI](#migrate-with-ai).
* **Rebuilding your frontend** using one of Prismic's supported frameworks: [Next.js](https://prismic.io/docs/nextjs.md), [Nuxt](https://prismic.io/docs/nuxt.md), or [SvelteKit](https://prismic.io/docs/sveltekit.md). Your agent can [build it too](https://prismic.io/docs/ai.md).

WordPress themes, plugins, and page builders do not transfer to Prismic. Instead, you'll build a modern, component-based frontend with full control over your website's code.

# Migrate with AI

[Set up your agent](https://prismic.io/docs/migration.md#set-up-your-agent), then start the migration with a prompt like this:

```md filename=Prompt
Migrate the blog and pages from https://example.com to a new Next.js
website with Prismic. The site uses WordPress. Keep the existing URLs.
Follow the migration guide: npx prismic docs view migration
```

The agent works in three steps:

1. **Export**: It exports your content through the [WordPress REST API](#export-wordpress-content).
2. **Model**: It maps WordPress posts, pages, and blocks to Prismic models. See [WordPress vs. Prismic](#wordpress-vs-prismic).
3. **Import**: It imports your content and assets with the [Prismic MCP server](https://prismic.io/docs/mcp.md).

[Learn how to migrate to Prismic with AI](https://prismic.io/docs/migration.md)

# WordPress vs. Prismic

Learn about the key differences between WordPress and Prismic.

## Content model

WordPress and Prismic structure content differently. Here's how WordPress concepts map to Prismic.

| WordPress        | Prismic                                                                                                                                                                                                        |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Posts and pages  | [Page types](https://prismic.io/docs/content-modeling.md#page-types)                                                                                                                                           |
| Authors          | [Custom types](https://prismic.io/docs/content-modeling.md#custom-types) + [content relationships](https://prismic.io/docs/fields/content-relationship.md#blog-post-authors)                                   |
| Taxonomies       | [Tags](https://prismic.io/docs/organize-pages.md#page-tags) or [content relationships](https://prismic.io/docs/fields/content-relationship.md#taxonomies)                                                      |
| Featured images  | [Image fields](https://prismic.io/docs/fields/image.md)                                                                                                                                                        |
| ACF fields       | [Fields](https://prismic.io/docs/fields.md), [repeatable groups](https://prismic.io/docs/fields/repeatable-group.md) for repeater fields, and [slices](https://prismic.io/docs/slices.md) for flexible content |
| Gutenberg blocks | [Slices](https://prismic.io/docs/slices.md)                                                                                                                                                                    |
| Post meta        | [Fields](https://prismic.io/docs/fields.md) in the static zone                                                                                                                                                 |
| Shortcodes       | [Slices](https://prismic.io/docs/slices.md) or [fields](https://prismic.io/docs/fields.md)                                                                                                                     |

> This mapping is a starting point, not a strict guideline. Every WordPress site is different — adapt these recommendations to fit your specific content structure and needs.

## Posts and pages

WordPress posts and pages map to Prismic [page types](https://prismic.io/docs/content-modeling.md#page-types).

* **Posts**: Create a reusable page type (e.g. `blog_post`).
* **Pages**: Create a reusable page type (e.g. `page`) for generic pages, or single page types for unique pages (e.g. `homepage`).

> Unlike WordPress where posts and pages are fundamentally different, Prismic treats all content as pages with different types. This gives you more flexibility in how you structure content.

## ACF Flexible Content and Gutenberg blocks

WordPress's flexible content approaches map directly to Prismic [slices](https://prismic.io/docs/slices.md).

Here's an example of how a common ACF Flexible Content setup might translate to Prismic slices.

| ACF Layout     | Prismic Slice      |
| -------------- | ------------------ |
| Hero           | Hero slice         |
| Text Block     | Text slice         |
| Image Gallery  | ImageGallery slice |
| Call to Action | CallToAction slice |
| Testimonials   | Testimonials slice |
| FAQ            | FAQ slice          |

Similarly, each Gutenberg block type you use becomes a slice in Prismic.

| Gutenberg Block | Prismic Slice                          |
| --------------- | -------------------------------------- |
| Paragraph       | Text slice (or inline in other slices) |
| Heading         | Text slice with heading configuration  |
| Image           | Image slice                            |
| Gallery         | Gallery slice                          |
| Quote           | Quote slice                            |
| Columns         | Columns slice (or slice variation)     |
| Buttons         | CallToAction slice                     |

> You don't need a 1:1 mapping. Use this opportunity to consolidate similar blocks into flexible slices with [variations](https://prismic.io/docs/slices.md#slice-variations).

## Routing

Prismic uses [route resolvers](https://prismic.io/docs/routes.md) to generate page URLs based on [documents' UID fields](https://prismic.io/docs/fields/uid.md).

| WordPress URL Pattern   | Prismic Route Resolver                      | Notes                           |
| ----------------------- | ------------------------------------------- | ------------------------------- |
| `/`                     | `{ type: "homepage", path: "/" }`           | Homepage                        |
| `/[slug]`               | `{ type: "page", path: "/:uid" }`           | Generic pages                   |
| `/blog`                 | `{ type: "blog_index", path: "/blog" }`     | Blog index page (single type)   |
| `/blog/[slug]`          | `{ type: "blog_post", path: "/blog/:uid" }` | Individual blog posts           |
| `/author/[slug]`        | `{ type: "author", path: "/author/:uid" }`  | If authors have dedicated pages |
| `/2024/01/15/post-name` | Not natively supported                      | See note below                  |

> **Important**
>
> WordPress's date-based permalinks (e.g. `/2024/01/15/post-name`) aren't natively supported in Prismic. Plan to simplify URLs to `/blog/post-name` and set up 301 redirects from old URLs to new ones at your hosting provider.

> Prismic supports more advanced routing patterns, including nested URLs based on content relationships. See the [route resolvers](https://prismic.io/docs/routes.md) documentation for details.

## Frontend

WordPress uses PHP themes and templates. Prismic websites are built with modern JavaScript frameworks.

| WordPress                  | Prismic                                                                                                                                              |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Themes                     | [Next.js](https://prismic.io/docs/nextjs.md), [Nuxt](https://prismic.io/docs/nuxt.md), or [SvelteKit](https://prismic.io/docs/sveltekit.md) projects |
| Template hierarchy         | File-based routing + page components                                                                                                                 |
| Template parts             | React, Vue, or Svelte components                                                                                                                     |
| `the_content()`            | [`<SliceZone>`](https://prismic.io/docs/slices.md#display-slices) component                                                                          |
| `get_posts()` / `WP_Query` | [Prismic client](https://prismic.io/docs/technical-reference/prismicio-client.md) methods                                                            |
| Plugins                    | npm packages                                                                                                                                         |

# Export WordPress content

Use the [WordPress REST API](https://developer.wordpress.org/rest-api) to export your content. Unless disabled, it's available at `/wp-json/wp/v2/` on any WordPress site and returns your content as JSON.

```javascript
// Fetch posts with embedded data (featured images, authors, terms, etc.)
const response = await fetch(
  "https://your-site.com/wp-json/wp/v2/posts?per_page=100&_embed",
);
const posts = await response.json();
```

Each request returns up to 100 items. Fetch the rest with the `page` parameter. The `X-WP-TotalPages` response header gives the number of pages.

Content fields like `content` and `excerpt` are HTML.

The [`@wordpress/api-fetch`](https://www.npmjs.com/package/@wordpress/api-fetch) and [`wp-types`](https://www.npmjs.com/package/wp-types) packages simplify fetching and type the responses.

> WordPress plugins often extend the REST API with custom endpoints and data (e.g. [ACF integration](https://www.advancedcustomfields.com/resources/wp-rest-api-integration)). Check your API responses for plugin-specific fields.

For complex migrations with custom database tables or non-standard content, you might need to query the WordPress database directly, use [WP Import Export](https://wordpress.org/plugins/wp-import-export-lite) plugin or other third-party export tools.

To migrate with your own code, see [Migrate to Prismic programmatically](https://prismic.io/docs/migration/programmatic.md).
