Rebuilding a navigation menu by hand on a new site is slow and error-prone: dozens of items, sub-menus, custom links and the right pages behind each label. WordPress’s own exporter can include menus only together with all posts and pages, as a WXR file. With Import Export by RockStarLab PRO, you export just the menu to a JSON file and import it on the other site, where its items are linked to the pages and categories that already exist there. In the example, a coffee roastery’s header menu moves to a new site.
PRO: menu export and import are part of PRO. Free: posts, pages, comments and media, including the pages your menu links to.
Short Answer
- On the old site, go to Export, choose Menus, add the filter Menu Name Equals your menu, and export all five fields as JSON.
- Make sure the pages and categories the menu links to exist on the new site.
- On the new site, go to Import, choose Menus, upload the file, click Auto Map and start the import. Then assign the menu to a location in Appearance → Menus.
Export the menu
Each menu is one row in the export. A filter on Menu Name picks the one you need; without a filter you get every menu on the site.

The menu export has five fields: Source Menu ID, Menu Name, Theme Locations, Items Count and Menu Items, which holds every item as JSON. Choose JSON as the format so the items stay readable. Our “Roastery Header” had six items:
- Home, Services and Blog: pages.
- About Us (a page) and News (a category), both under Services.
- Online Shop: a custom link to the shop on its own domain, opening in a new tab.
Part of the exported file:
[
{
"term_id": 233,
"name": "Roastery Header",
"locations": "",
"count": 6,
"menu_items": [
…,
{
"ID": 2047,
"title": "About Us",
"url": "https://www.example-roastery.com/about-us/",
"menu_item_parent": "2046",
"type": "post_type",
"object": "page",
"object_path": "about-us",
"target": ""
},
{
"ID": 2050,
"title": "Online Shop",
"url": "https://shop.example-roastery.com/",
"menu_item_parent": "0",
"type": "custom",
"object": "custom",
"target": "_blank"
}
]
}
]
Next to each page item the file stores the page’s path (object_path), and next to each category the term’s slug. That’s how the import finds the right page on the new site, even when its ID is different.
Import it on the new site
Move the pages first, if the new site doesn’t have them yet (see moving content with its slugs). Then, in Import, choose Menus, upload the JSON file and click Auto Map:

On the options step we left Check for Existing Items by Field empty, so the import created a new menu.
The result on the new site:

- All six items arrived in the same order, with About Us and News under Services.
- About Us has a different page ID on the new site. The import found it by its path,
about-us, and linked the item to the new page. - Home, Services and Blog link to the pages on the new site, and News to the new site’s category.
- Online Shop kept
https://shop.example-roastery.com/and its new-tab setting. Custom links that pointed to the old site’s own pages are moved to the new site’s address.
Our menu had no theme location on the old site, so we assigned one under Menu Settings after the import. The locations depend on the theme, so check them on every new site.
When a page doesn’t exist on the new site
If the import can’t find the page or category an item points to, the item is kept as a custom link, so the menu stays complete. Check those items afterwards and either create the missing page or point the item to another one.
Before you import
Importing a menu adds or changes menus on the new site; it doesn’t touch pages or posts. Still, back up the site before larger imports, and keep the exported JSON file as a copy of the menu.
With an AI agent
An AI agent connected through the WordPress MCP Adapter (see connecting Claude Code to WordPress) can check the menu after the import:
Show me the items of the Roastery Header menu with their links.
In our run on the new site, the agent called rsl-ie-pro/export-preview for the menu. It returned six items: About Us under Services, pointing to the new page with its new ID, five links on the new site’s address, and Online Shop with https://shop.example-roastery.com/ and the target _blank.
FAQ
Can I export all menus at once?
Yes. Leave out the Menu Name filter; each menu becomes one row in the file.
Does it work with block themes and the Navigation block?
No. This exports classic menus from Appearance → Menus. A Navigation block stores its links in the block itself.
What’s the difference from syncing menus?
Export and import work with a file and need no connection between the sites. To keep menus in step between two connected sites, see syncing menus between sites.
Can I use CSV instead of JSON?
Yes, but the Menu Items column is JSON either way, so a JSON file is easier to read and edit.
Related Guides
- How to Sync WordPress Menus Between Sites with ACF Fields
- Move WordPress Posts to a New Site and Keep Dates, Authors and Slugs
- Menu Imports Keep External Links (What’s New in PRO 2.1.10)
- Export WordPress Pages to CSV: Titles, URLs, Parent and Template
Get the free plugin on WordPress.org.

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