To export WordPress menus without a plugin, go to Tools>Export, leave All content selected and click Download Export File. That XML file includes every classic menu, every block theme Navigation menu, and the pages, posts and categories the menu items point to. Import it on the other site with the free WordPress Importer plugin under Tools>Import.
WordPress core has no “menus only” export option. If you want a file with just the menus, the free Export WordPress Menus plugin adds a Navigation Menu Items choice to the export screen. A menus-only file made any other way usually imports with most of its links missing, and the sections below show why.
Everything here was tested on WordPress 7.1 with WordPress Importer 0.9.7, using a classic theme (Twenty Twenty-One) and a block theme (Twenty Twenty-Five).
| Method | Best for | What comes across | Catch |
|---|---|---|---|
| Tools > Export, All content | Full migrations, staging to live | Menus, menu items, the content they link to, Navigation block menus | Brings every post and page too; theme menu locations are not included |
| Export WordPress Menus plugin | Classic menus only | Menus, items, linked posts, pages and terms | Unmaintained since March 2021; custom post type items are not bundled |
| Import Export Menu plugin | Classic menus between existing sites | Menus as a JSON file, remapped by slug | Needs the plugin on both sites |
| Site Editor code editor (copy and paste) | One Navigation block menu | The menu block markup | Post IDs inside the links are not remapped |
| WP-CLI | Scripted or repeat moves | Whatever you list or export | There is no wp menu export command |
What a WordPress menu export actually contains
A classic WordPress menu is stored in two parts. The menu itself is a term in the nav_menu taxonomy, and each link in it is a post of the type nav_menu_item. The export file (WXR, short for WordPress eXtended RSS) writes both. In our test export, each menu item carried these fields:
| Field in the export | What it holds | Example from the test |
|---|---|---|
_menu_item_type | post_type, taxonomy or custom | post_type |
_menu_item_object | Which kind of object | page |
_menu_item_object_id | The ID of the page, post or term on the old site | 4 |
_menu_item_menu_item_parent | Parent menu item ID, for dropdowns | 0 |
_menu_item_url | Only filled for custom links | https://old-site.com/shop/ |
_menu_item_classes, _menu_item_target | CSS classes and “open in new tab” | cta highlight |
nav_menu category tag | Which menu the item belongs to (by slug) | main-menu |
Two things follow from that. Page, post and category items are stored as an ID, not a URL, so the importer has to match that ID to something on the new site. Custom links store a full URL, so they keep whatever domain they had when you exported.
The file also leaves out which menu sits in which theme location (Primary, Footer and so on). That setting lives in the theme options, not in posts, so you reassign it after every import.
Export all content, including menus (no plugin)
Start here for a migration or a staging push, because the menu items and the objects they point to travel in the same file.
- On the old site, open Tools>Export. The All content description on that screen lists “navigation menus” among what it includes.
- Click Download Export File and save the XML.
- On the new site, open Tools>Import, find WordPress, and click Install Now, then Run Importer.
- Upload the file, assign authors, and tick Download and import file attachments if you want media too.
- Go to Appearance>Menus, open Manage Locations, and assign the imported menu to its theme location.

In the test, a five-item menu (two pages with a parent and child, a category, a custom link and a third page) came through complete: the hierarchy, CSS classes and the “open in new tab” setting all survived, and the page items pointed at the newly imported pages. The menu was not assigned to any location until we set it by hand.
If you are moving the whole site rather than a few pieces of content, a full-site tool from our list of WordPress migration plugins is less work, since it carries the database, theme options and menu locations in one go.
Export only your menus with a plugin
Core does not offer a menus-only option on the export screen. The Export WordPress Menus plugin by Tyche Softwares adds one. It still worked on WordPress 7.1 in our test, but its last update was March 2021 and it was last tested with WordPress 5.7, so install it for the export and remove it after. Our guide to abandoned WordPress plugins explains why leaving unmaintained plugins active is a risk.
1. Install and Activate Export WordPress Menus
Search for “Export WordPress Menus” under Plugins>Add Plugin and activate the one by Tyche Softwares. If you have not done this before, here is how to install a WordPress plugin.

2. Run the WordPress Export Tool
Go to Tools>Export. With the plugin active, a new Navigation Menu Items option appears in the list. Select it and click Download Export File.

The plugin does more than filter the export. Its file adds the menu definitions, the categories or tags used as menu items, and the posts and pages the menu links to. That is what lets the import rebuild the links. Items that point at custom post types (products, portfolio items) are not bundled, so those need to exist in the same import or they will be dropped.
3. Import WordPress Navigation Items
On the destination site, go to Tools>Import and click Run Importer under WordPress (install it first if you see Install Now).


Upload the file, assign the imported content to an author, and submit.

When it finishes, the menu shows up in Appearance>Menus. Assign it to a location under Manage Locations, since that part never comes across.
Pages in the file that already exist on the new site, matched by the same title and the same publish date, are reused instead of duplicated. A page with the same title but a different date is not a match: in our test, an existing “About” page with a different date led the importer to create a second one at /about-2/ and point the menu there.
Why a menus-only export file loses most of its links
It is tempting to export only the nav_menu_item post type, for example with WP-CLI. We tried files like that against the WordPress Importer, and they fail in two ways.
- Without the menu definition in the file, every item is rejected with “Menu item skipped due to invalid menu slug: main-menu”. The core export only writes menu definitions when you choose All content.
- With the menu present, only custom links import. Page, post and category items were dropped silently, with no error on screen, even when the destination site already had the exact same pages.
The second one surprises people. Looking at the importer code, it only maps a menu item to a page that was processed in the same import, either newly created or matched to an existing one. A page that is not in the file never gets mapped, so the item waits for an object that never arrives and is discarded at the end. The fix is to export the menu together with the content it links to, which is exactly what All content and the Export WordPress Menus plugin do.
Block themes: exporting Navigation block menus
Block themes such as Twenty Twenty-Five do not use Appearance>Menus. Menus live in the Navigation block, and each menu is saved as its own post of the type wp_navigation. You manage them under Appearance>Editor>Navigation. The header template only stores a reference to that post, such as <!-- wp:navigation {"ref":55} /-->.
Here is how the export options handled a block theme menu in our test:
| Export option | Includes the menu links? | Notes |
|---|---|---|
| Tools > Export, All content | Yes | Exports the wp_navigation post and any customized template parts. There is no separate Navigation option in the list. |
| Site Editor: Options (three dots) > Export | No | Downloads a theme zip whose header part contains only the ref number, not the links. |
| Code editor copy and paste | Yes | Copies the link blocks for one menu. |
The importer does not rewrite IDs inside block markup. When we imported an All content file into a site where the old IDs were already taken, the Navigation post came in under a new ID, but the header still pointed at the old number, so the header rendered with no menu links. Each link block also keeps the old page ID and a hard-coded URL.
So after importing a block theme site:
- Open Appearance>Editor, select the Navigation block in your header, and pick the imported menu in the block settings. That saves the new reference.
- Click through each menu link and reselect its page if the site has new IDs or a new domain.
Copy a Navigation menu with the code editor
For moving a single menu, copy and paste is fastest. Open Appearance>Editor>Navigation, choose the menu, and click Edit. In the Options menu (three dots, top right) switch to Code editor (Shift+Option+Command+M on a Mac, Ctrl+Shift+Alt+M on Windows). You will see the raw link blocks:
<!-- wp:navigation-link {"label":"About","type":"page","id":65,"url":"https://old-site.com/about/","kind":"post-type"} /-->
<!-- wp:navigation-link {"label":"Docs","url":"https://example.com/docs/","kind":"custom"} /-->
Copy it, open a menu on the destination site the same way, switch to the code editor and paste. Before saving, change the domain in each url, and fix or remove the id values: a link whose ID points at a post that does not exist or is not published is hidden on the front end.
Export and import menus with WP-CLI
WP-CLI has a wp menu command with create, delete, item, list and location subcommands. There is no wp menu export or wp menu import (checked against WP-CLI 2.12). These are the useful pieces:
# See menus and their items on the source site
wp menu list
wp menu item list main-menu --fields=db_id,type,object,object_id,title,link
# Full export that keeps menus and the content they link to
wp export --dir=./export
# On the destination (needs the WordPress Importer plugin)
wp plugin install wordpress-importer --activate
wp import ./export/*.xml --authors=skip
# Menu locations are not in the file, so set them again
wp menu location list
wp menu location assign main-menu primary
wp export --post_type=nav_menu_item does include the menu definition, unlike the admin screen, but it hits the same wall as above. In our test the page and category items were dropped on import and only the custom link survived. Adding pages (--post_type=page,nav_menu_item) brought the page items back, yet the category item was still lost because categories were not in the file.
For small menus on a site that already has the same content, rebuilding with wp menu item add-post, add-term and add-custom from the wp menu item list output is often cleaner than importing at all.
If you changed domains, custom links and Navigation block links still carry the old address. Run wp search-replace 'https://old-site.com' 'https://new-site.com' --dry-run first, then without --dry-run. Our mixed content guide covers the same command for http to https changes.
WordPress menu export plugins compared
Maintenance status below comes from the WordPress.org plugin directory on November 9, 2026.
| Plugin | Last updated | Tested up to | Active installs | How it works |
|---|---|---|---|---|
| Export WordPress Menus | March 12, 2021 | 5.7 | 1,000+ | Adds a Navigation Menu Items option to Tools > Export; import with WordPress Importer |
| Import Export Menu | October 6, 2026 | 7.0 | 3,000+ | Exports menus to a JSON file; its importer matches items to content by slug, then path, then title, and can assign theme locations |
| WordPress Importer | October 20, 2026 | 6.8 | 2+ million | The official importer for WXR files from Tools > Export |
We tested Export WordPress Menus and WordPress Importer hands-on. The Import Export Menu details come from its plugin page. Its matching by slug is the main reason to pick it when both sites already have the same pages but different IDs.
Troubleshooting menu imports
| Problem | Cause | Fix |
|---|---|---|
| “Menu item skipped due to invalid menu slug” | The file has menu items but not the menu itself | Re-export with All content or the Export WordPress Menus plugin, or create a menu with the same slug first |
| Only custom links imported | Pages, posts or terms the items point to were not in the same file | Export the menu together with its content |
| Menu imported but not showing | Theme locations are not exported | Appearance > Menus > Manage Locations, or wp menu location assign |
| Every item appears twice | The same file was imported twice; the importer skips existing pages but adds menu items again | Delete the duplicates, or delete the menu and import once into a clean menu |
| Links go to the old domain | Custom links and Navigation block links store full URLs | wp search-replace or edit those links by hand |
| Menu points to /about-2/ | A same-titled page with a different publish date already existed, so a second copy was created | Delete the duplicate page and reselect the original in the menu |
| Block theme header shows no menu | The header still references the old Navigation post ID | Select the Navigation block and pick the imported menu |
Before any import on a live site, take a backup. Our guide on how to back up a WordPress site covers five ways to do it.
FAQ
Can you export a WordPress menu to another site without a plugin?
Yes. Use Tools > Export with All content, then import the file with the WordPress Importer on the other site. Menus, items and the content they link to come across together. You only need a plugin if you want a file with nothing but the menus.
Does Tools > Export include menus?
Only when All content is selected. That option includes classic menus and block theme Navigation menus. The Posts, Pages and Media options leave menus out, and core has no separate Navigation Menu Items option unless a plugin adds one.
Why are my menu items missing after import?
The WordPress Importer drops page, post and category menu items whose target was not part of the same import, without showing an error. Custom links still import because they store a full URL. Export the menu together with its pages, posts and categories.
Does the Site Editor export include navigation menus?
No. The Export option in the Site Editor downloads a theme zip with your templates and styles. The header part only contains a reference number for the Navigation menu, not the links themselves. Use Tools > Export or copy the menu through the code editor.
Is there a WP-CLI command to export menus?
No. WP-CLI has wp menu list, wp menu item list and wp menu location, but no export or import subcommand. Use wp export for a full WXR file and wp import on the destination, then reassign locations with wp menu location assign.


