Do you want to import and export navigation menus in WordPress?
The default WordPress import/export feature allows you to move menus from one website to another as part of a full site transfer. However, it doesn’t allow you to import and export menus by themselves.
In this article, we will show you how to easily import and export navigation menus in WordPress without doing a full site transfer.
Why Import and Export Navigation Menus in WordPress?
Every WordPress website has built-in import and export features. You can find these by going to Tools » Import and Tools » Export in your WordPress dashboard.
If you go to the Export page, then you will see the default options.
Here, you can choose to export all content or export only your posts, pages, or media.
However, sometimes you may only want to export the navigation menu. For example, you might be creating a sister website for a new product and want to keep the same design.
In this case, you could do a full site transfer and then delete the unwanted content from the sister website. However, this would take a lot of time and effort.
With that in mind, let’s see how you can copy a navigation menu to a new WordPress blog without exporting the rest of your content.
How to Export and Import Navigation Menus in WordPress
Before going any further, make sure you are happy with the menu you plan to export. You can find your site’s menu by going to Appearance » Menus in the WordPress dashboard.
For more information on how to change the menu, please see our detailed guide on how to add a navigation menu in WordPress.
Upon activation, you need to go to Tools » Export in your WordPress admin dashboard.
You will see a new option to export navigation menu items. This will include the menu itself, plus all the content that’s linked in the menu. The plugin will also export any comments left on those posts.
To export this content, simply select the ‘Navigation Menu Items’ radio button and then click the ‘Download Export File’ button.
This downloads the navigation menu, plus all of its linked pages and comments.
All of this content is stored in an .xml file with the name site.wordpress.yyyy-mm-dd, where “site” is the name of your website, and “yyyy-mm-dd” is the date you created the download.
Importing Your WordPress Menu to Your New Site
Now, you can import the .xml file using WordPress’s standard Import feature.
Important: Before you begin, check that the destination website doesn’t have any pages with the same name as the new menu, including any pages in the trash. If you skip this step, then the import tool may not import those pages correctly.
First, log in to the website where you want to import the navigation menu. Then, head over to Tools » Import.
Here, you will need to install the WordPress importer, so find the ‘WordPress’ heading and click on its ‘Install Now’ button.
After installing the WordPress importer, you should see a new ‘Run Importer’ link.
You can go ahead and click on this link.
On the Import WordPress screen, you must click the ‘Choose file’ button and choose the .xml file you download earlier.
Then, go ahead and click the ‘Upload file and import’ button.
On the next screen, you will be asked to assign the imported content to an author.
If you run a multi-author WordPress blog, then you can open the ‘assign posts to an existing user’ dropdown and choose an author from the list.
Another option is to add a new user or author for this content by typing a login name into the ‘create new user…’ field.
If you are importing pages along with the menu, then you will also want to check the ‘Download and import file attachments’ box to make sure any images are included in the import.
When you are happy with how the import is set up, click on the ‘Submit’ button.
After a few moments, you should see a message saying that the import was a success.
Viewing Your Imported Menu and Pages
To take a look at the imported menu, just go to Appearance » Menus. Here, you can make sure that everything is set up correctly.
You can also click on the Pages tab in your WordPress dashboard to check that any linked pages, comments, and images were imported along with the menu.
We hope this article helped you learn how to import and export navigation menus in WordPress. You might also like to see our guide on how to create a free business email address or see our expert picks for the must have WordPress plugins for business websites.