Recipes from a headless CMS, articles from an old site’s API, entries from a no-code tool: a lot of content leaves its home as JSON. Import Export by RockStarLab imports a JSON file into WordPress posts, including nested values such as an author object or an image object, with authors, categories, tags, dates and featured images. The example has three recipes for a coffee roastery’s blog.
Free: JSON import into posts and pages is in the free plugin. PRO: custom post types, users and WooCommerce products.
Short Answer
- Make sure the file is an array of objects:
[ { … }, { … } ]. If your API wraps it ({"recipes": [ … ]}), save the inner array. - Go to Import Export by RockStarLab → Import, choose Posts and upload the .json file.
- Click Auto Map. Nested values appear as their own columns, such as
author.nameandimage.url. - Keep the source’s own
idin a custom field instead of the WordPress ID, then run the import.
The file
Each recipe has flat fields, a list of tags, and two objects, the author and the image:
[
{
"id": 501,
"slug": "iced-oat-latte",
"name": "Iced Oat Latte",
"summary": "A double shot over ice with oat milk.",
"body": "<p>Pull a double shot, pour over ice and top with 150 ml oat milk.</p>",
"published": "2026-05-02 08:00:00",
"category": "Recipes",
"tags": ["iced", "oat milk"],
"author": { "name": "Lena Novak", "email": "lena@example-roastery.com" },
"image": { "url": "https://old.example-roastery.com/…/iced-oat-latte.jpg", "alt": "Iced oat latte in a tall glass" }
},
…
]
APIs often wrap the list with paging information, like {"count": 3, "recipes": [ … ]}. The importer reads a top-level array of objects (or an object whose members are objects), so save just the recipes array as the file. With the jq tool that’s jq '.recipes' response.json > recipes.json; most code editors can do the same.
Map the columns
The values inside author and image appear as their own columns, named by their path. Auto Map placed most of them:

author.nameandauthor.emailgo to the author fields, which find the user by email or create an author account.image.urlandimage.altbecome the featured image and its alt text.publishedholds a date, so it went to Date.tagsis a list and imports as several tags.- We dragged
summaryto Excerpt ourselves.
Auto Map also matched id to the WordPress ID. For content from another system, remove that mapping: the source’s 501 has nothing to do with post 501 on your site. We added a custom field source_id with + Add in the Custom Fields group and mapped id there. It’s useful later for updates: export the posts with that field, or match on it.
The result

All three recipes were created in 2 seconds:
- Publish dates from
published(2 May, 10 June and 1 July 2026). - Authors: Lena Novak and Tomás Rivera, found or created from their name and email.
- Category Recipes, and tags “iced”, “oat milk”, “summer” and “cold brew” from the lists.
- The image downloaded to the Media Library as the featured image of the Iced Oat Latte, with its alt text.
source_id501, 502 and 503 on the posts.
The HTML in body went into the content as it was. For more on HTML content, see importing HTML without breaking formatting.
Before you import
A JSON import can create users, terms and media as well as posts. Back up the site and try a file with two or three records first.
With an AI agent
An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can check the imported recipes:
List the posts in Recipes with their date, author, source ID and tags.
In our run, the agent called rsl-ie/export-preview with those fields for the Recipes category. It returned the three recipes with the dates from the file, Lena Novak and Tomás Rivera as authors, source IDs 501 to 503 and their tags.
FAQ
What JSON structure can I import?
An array of objects, or an object whose members are objects. Save a wrapped API response’s inner array as the file.
How are nested objects handled?
Each value inside an object gets its own column named by its path, like author.name or image.url. The original column stays too.
How do lists import?
A list such as tags stays one column. Mapped to a taxonomy, each item becomes a term.
Can I import from a JSON URL?
Yes. Import from a URL, or schedule it to repeat; see the scheduled import guide.
Should I map the source id to the WordPress ID?
No, for content from another system. Keep it in a custom field so you can match records later.
Related Guides
- Nested JSON Imports and Smarter Auto Map (What’s New in 2.1.41)
- CSV, JSON, XML, XLSX and ODS: What Data Formats Are and When to Use Them
- How to Assign Post Authors When Importing WordPress Posts from CSV
- Automatic WordPress Import from a URL on a Schedule
Get the free plugin on WordPress.org.

Comments 0
Have a question or a tip to share? Leave it below.