WordPress to Sanity · updated 23 November 2026

WordPress to Sanity migration

To migrate a WordPress site to Sanity automatically, read the content out of WordPress, write each page and post as a Sanity document in an NDJSON file, and import that file into a dataset. The tools: the WordPress REST API gives your pages and posts as JSON; the Sanity CLI command sanity datasets import loads an NDJSON file (one JSON document per line, each with a _type) into a dataset; and Sanity's client libraries let a script of your own send the documents instead, within Sanity's rate limits. Surge Migrate does the conversion for you: it reads the public pages of your WordPress site and writes one NDJSON dataset file and schema type files for a Sanity Studio, with a conversion report, and checks the file's structure before you import it. 10 pages are free.

What was proven for the Sanity format: Format checked against the vendor's documentation; not yet imported into a live Sanity instance. These files are made from your pages by the same code. We checked their structure. We did not import them: try them on a test site first. WordPress writes the same class names on every block-editor site, so the core blocks convert without a per-site mapping.

No account needed. Public pages only, robots.txt obeyed. Nothing is installed in your system by these tools.

Sources on the other tools, read 24 November 2026: WordPress: REST API Handbook · Sanity: Import data.

How it works

Scan, convert, verify, install: from WordPress to Sanity

  1. 1

    Scan

    Names the system behind your site, counts pages and templates, lists the blocks to build and the work no tool does, and gives an effort range with its working.

    Scan a site →
  2. 2

    Convert

    Each page is written in Sanity's import format. The same run also writes the other target formats, so you can compare them. 10 pages free.

    Convert your pages →
  3. 3

    Verify

    A download is offered only when its own format check passes. The report lists every field not found and every component kept as plain content. Compare old and new pages side by side.

    Parity check →
  4. 4

    Install

    You import with the target system's own tool, on your own environment. Each download's README gives the command. Your system changes only when you run it.

    How each import was tested →

Convert: the Sanity download

What you get for Sanity

The download holdsOne NDJSON dataset file, schema type files for a Sanity Studio, the README, the conversion report, the asset list and the redirect list.
Loaded withSanity's own dataset import command.
What was provenFormat checked against the vendor's documentation; not yet imported into a live Sanity instance.
Your own pagesThese files are made from your pages by the same code. We checked their structure. We did not import them: try them on a test site first.
Before you importSanity's import tool creates published documents, so use a test dataset first.

How each import was tested, with the recorded runs: any CMS to any CMS. The proof is for the Sanity format. We have not published a WordPress site imported into Sanity.

Scan and convert: the WordPress side

What is read from a WordPress site

WordPress writes the same class names on every block-editor site, so the core blocks convert without a per-site mapping. The reader for WordPress is the same one that feeds every target, so the table of what each WordPress part becomes is on the WordPress to Edge Delivery page.

WordPress features that do not convert

The conversion carries content. These WordPress features are not content and need a person: they are rebuilt in Sanity or with another tool, or dropped. The conversion report lists what was left out, page by page.

  • Comments and comment forms
  • Query Loop and Latest Posts as live lists
  • Plugin blocks (shop, forms, events, members)
  • Shortcodes
  • Search
  • Divi, WPBakery and other page builders
  • Logged-in areas and memberships

Questions

WordPress to Sanity: common questions

How do I migrate a WordPress site to Sanity automatically?

Read your pages and posts from the WordPress REST API, write them as Sanity documents in an NDJSON file and load it with the Sanity CLI (sanity datasets import), or send them from your own script with one of Sanity's client libraries. Surge Migrate writes the NDJSON file and schema type files for you from your public WordPress pages, with a conversion report and a structure check, and you run the import yourself. 10 pages are free.

Is there a tool that migrates WordPress to Sanity?

Surge Migrate reads the public pages of a WordPress site and writes them in Sanity's import format. One NDJSON dataset file, schema type files for a Sanity Studio, the README, the conversion report, the asset list and the redirect list. 10 pages are free and need no account; the downloads ask for an email address.

How do I import the result into Sanity?

Sanity's own dataset import command. The download's README gives the steps. You run the import yourself, on your own environment; nothing is installed in your system by Surge Migrate.

Has the Sanity import been tested?

Format checked against the vendor's documentation; not yet imported into a live Sanity instance. That proof is for the Sanity format, not for your WordPress site: these files are made from your pages by the same code. We checked their structure. We did not import them: try them on a test site first.

What does not move from WordPress automatically?

Text, images and the common layouts convert. Comments and comment forms, Query Loop and Latest Posts as live lists, Plugin blocks (shop, forms, events, members) and similar features need a person. The conversion report lists what was left out, page by page.

Will the new site look like the old one?

No. The conversion carries content and structure, not the design. The design is rebuilt for the new system.

What does it cost?

The scan is free. Converting 10 pages is free. Larger runs of 500 or 2,000 pages are paid per run; the self-serve pricing page has the prices and how to start one.

Prices: self-serve pricing. Surge Migrate is not affiliated with WordPress or Sanity.

Other moves

From WordPress, and to Sanity

From WordPress to: AEM as a Cloud Service · Edge Delivery Services · Drupal · Contentful · Sitecore · Optimizely · Contentstack

To Sanity from: Drupal · Sitecore · Optimizely · Kentico · Umbraco · HubSpot · SharePoint · Liferay · HCL DX · Magnolia · Sitefinity · Bloomreach · TYPO3 · Joomla · Webflow · Wix · Squarespace · Shopify · Ghost · AEM

All platforms · Talk to an engineer