Skip to main content
CMSquestions

How To Migrate From WordPress To Sanity

IntermediateQuick Answer

TL;DR

Migrating from WordPress to Sanity involves exporting your WordPress content via the REST API or a database dump, defining matching Sanity schemas in code, transforming your content (especially converting HTML to Portable Text), and importing it using Sanity's CLI or mutation API. The process typically takes 2-8 weeks depending on content complexity, custom fields, and media volume.

Key Takeaways

  • Export WordPress content using REST API or WP-CLI export
  • Define Sanity schemas that map to your WordPress post types and custom fields
  • Convert WordPress HTML/Gutenberg blocks to Sanity's Portable Text format
  • Use sanity dataset import or the mutations API for bulk content loading