Moving off WordPress, or building anything on top of your content, almost always starts the same way: get the whole site out as structured data. JSON is the natural target, because a headless frontend, a static site generator, a search index, and an AI pipeline can all read it directly.
The trap is that most quick exports grab the body text and leave behind everything attached to it. You launch, and a month later you are wondering why traffic dropped. Here is how to export to JSON so that nothing important is left behind.
Why JSON, and why it is the base format
JSON is the lowest common denominator for content. Once your site is a clean JSON file, converting it into anything else, Markdown or MDX for a static site, CSV for a spreadsheet, or a headless CMS import, is a transform on data you already trust. That is why it is worth getting the JSON right first, and treating the other formats as views on top of it.
The three things that usually break
A naive export gives you titles and body text and calls it done. In practice, three things go missing, and each one costs you.
1. Your SEO meta, and with it your rankings
Your titles, meta descriptions, and canonical settings do not live in the post. They live in Yoast, Rank Math, or All in One SEO, tucked away in meta fields. Grab only the body and you ship every page without the meta that was ranking it. You also need your old permalinks, not necessarily to reuse them, but to build a redirect map. If a URL changes and nothing points the old address to the new one, that page starts again from zero in Google.
2. Media and custom-field images
Body images are the easy case. The hard case is images stored in custom fields. ACF, JetEngine, and Pods often store an image as an attachment ID, a bare number like 4192. That number is meaningless on a new system. A good export has already looked up each ID and turned it into a real media object with a URL, alt text, and dimensions.
3. Everything structural
Categories, tags, custom taxonomies, and your navigation menus define how the site is organized. Rebuilding them by hand is slow and error prone. They should come along in the export as plain, readable data.
If your site runs Elementor, Bricks, WPBakery, Divi, or Oxygen, there is a fourth trap: the content itself comes back empty, because builders store their layout in hidden meta fields rather than in post_content. See exporting an Elementor or Bricks site to JSON for why, and how to render it properly.
The shape of a good export
Pull those requirements together and the file you want holds, for every page, post, and custom post type, an object like this:
{
"type": "post",
"title": "Corneal Cross-Linking",
"slug": "corneal-cross-linking",
"permalink": "https://old-site.com/blog/corneal-cross-linking/",
"document_title": "Corneal Cross-Linking | Cairo Eye Center",
"content_html": "<h2>A minimally invasive...</h2>...",
"seo": { "description": "...", "canonical": "..." },
"featured_image": { "url": "...jpg", "alt": "...", "width": 1200 },
"custom_fields": { "doctor": "Dr. Sara" },
"custom_fields_media": { "before_photo": { "url": "...jpg", "alt": "..." } },
"taxonomies": { "category": [ { "name": "Procedures", "slug": "procedures" } ] }
}
The details that matter: permalink drives your redirect map, document_title and seo rebuild your search snippets, and custom_fields_media is the difference between real images and dead attachment numbers.
How to get it without writing an exporter
You can write a REST or WP-CLI script to assemble all of this. It is real work, especially the builder rendering and the custom-field image resolution, and it is work you do once and then throw away. The free plugin Migratik does it out of the box.
Your whole site, one JSON file
Install Migratik on the WordPress site you are exporting, open its screen, review the counts, and download one clean JSON file. It captures the rendered content, the SEO meta, the permalinks for redirects, the featured and in-content images, and the ACF, JetEngine, and Pods fields with image fields already resolved to real media. It is read-only and builder-agnostic, so it is safe on a live site and does not come back empty for page builder pages.
Automating it over REST
For a one-off migration, the download button is all you need. If you want the export to run from a build script or a scheduled job, two read-only REST endpoints back the same capture:
# Counts per content type, a quick manifest
curl "https://your-site.com/wp-json/migratik/v1/manifest?key=YOUR_KEY"
# The full export payload as JSON
curl "https://your-site.com/wp-json/migratik/v1/all?key=YOUR_KEY" \
-o wordpress-export.json
Both require a logged-in administrator or the Migratik REST key, so your content is not exposed publicly. That makes it easy to pull fresh content into a static build on every deploy, rather than exporting by hand each time.
Where to go from your JSON
Once you have the file, the destination decides the next step. Our guides pick up from here: migrating to Next.js, migrating to Astro, moving to a headless CMS, or rebuilding on another WordPress install, each without losing your SEO. If you would rather have files than raw JSON, Migratik Pro turns the same capture into Markdown or MDX with front matter, or CSV, and can bundle every image alongside the export with the URLs rewritten, so the result is self-contained.
Frequently asked questions
How do I export a WordPress site to JSON?
You can pull posts from the WP REST API and assemble the JSON yourself, or use a tool that captures the whole site in one step. A free plugin like Migratik exports every content type into a single clean JSON file, with rendered content, SEO metadata, media, and custom fields already included, from a single button in the admin.
What does a WordPress JSON export include?
A complete export includes the rendered content HTML, the title, slug, and permalink for redirects, SEO meta from Yoast, Rank Math, or All in One SEO, featured and in-content images with alt text, custom fields with image fields resolved to real media, taxonomies, and navigation menus.
Can I export WordPress to JSON without code?
Yes. Install Migratik, open its screen in the WordPress admin, and click download. It produces the full JSON file with no command line and no code. Two read-only REST endpoints are also available if you want to automate the export from a build script.
Does the JSON keep my SEO metadata and custom fields?
Yes. The export carries your SEO meta and permalinks so you can rebuild titles, descriptions, canonicals, and 301 redirects, and it resolves ACF, JetEngine, and Pods image fields from attachment IDs into real media objects so nothing points at a dead number.
Export your site to JSON
Migratik packs your whole WordPress site (rendered content, SEO metadata, permalinks, images, and custom fields) into one clean JSON file. Free to install, read-only, and safe on a live site.