Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/eltictacdicta/md-menus-import-export/archive/refs/heads/main.zipA WordPress plugin for importing and exporting WordPress navigation menus.
Description
MD Menus Import Export is a powerful tool that allows WordPress administrators to easily export existing menus to JSON files and import them into other WordPress installations. This plugin is perfect for developers and site administrators who need to migrate menus between different WordPress environments or create backups of menu structures.
Features
- Export Menus: Export all WordPress navigation menus to a JSON file
- Import Menus: Import menus from a JSON file
- Preview Import: Preview how imported menus will look before applying changes
- Clean Menus: Option to clean all existing menus before import
- Detailed Logging: Comprehensive logging of all operations for troubleshooting
Installation
- Upload the
md-menus-import-exportfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Access the plugin via the 'MD Menus' menu item in the WordPress admin sidebar
Usage
Exporting Menus
- Navigate to the 'MD Menus' page in your WordPress admin area
- Click the 'Export Menus' button
- The plugin will generate a JSON file containing all your menus and their items
- Download the file when prompted
Importing Menus
- Navigate to the 'MD Menus' page in your WordPress admin area
- Under the 'Import Menus' section, click 'Choose File' and select your JSON file
- Optionally check 'Clean existing menus before import' if you want to remove all existing menus
- Click 'Preview Import' to see what will be imported without making changes
- If the preview looks good, click 'Import Menus' to complete the import
JSON Format
The plugin uses a specific JSON format for menu exports:
{
"menus": [
{
"name": "Menu Name",
"description": "Menu Description",
"items": [
{
"title": "Menu Item Title",
"url": "https://example.com",
"menu_order": 1,
"type": "custom"
}
]
}
]
}
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
Frequently Asked Questions
Will this plugin overwrite my existing menus?
By default, the plugin will add imported menus alongside your existing ones. If you want to replace all existing menus, check the "Clean existing menus before import" option.
Can I import menus from another WordPress site?
Yes, as long as you have a JSON export file created with this plugin or one that follows the same format.
Is it possible to import only specific menus?
Currently, the plugin imports all menus found in the JSON file. Selective import may be added in future versions.
License
This plugin is licensed under the GPL v2 or later.
Author
Created by MisterTek
Support
For support, please visit https://mistertek.es