Command-Line Interface

You can use some Admin Menu Editor Pro features from the command line. The plugin adds the admin-menu-editor command to WP-CLI. To get started, install WP-CLI and run this command for a list of options:

wp help admin-menu-editor

Here’s a summary of the available subcommands and a few examples.

activate-license

Activate a license key on the site.

# wp admin-menu-editor activate-license ABC123
Success: Success! This site is now licensed.

Tips

It’s safe to run this command multiple times. Activating the same license key twice (or twenty times) on the same site will not break anything. As far as license limits are concerned, the system tracks the number of unique site URLs, not the total number of key activations.

deactivate-license

Remove the current license from the site.

# wp admin-menu-editor deactivate-license
Success: Success! The current license has been removed.

license-status

Display information about the currently active license.

# wp admin-menu-editor license-status
License found : Yes
Licensed URL  : http://localhost/test
Status        : valid
Expires       : 2016-01-01T06:42:06+00:00
License key   : Not stored in the WordPress database
Site token    : T56KB0XYZ380SLPVGGPAEHK1O2MOMNT4

export

Export the admin menu configuration as JSON. You can either pass the export file name as an argument, or dump the JSON to the terminal by using the --output option.

# wp admin-menu-editor export menudata.json
Success: Export completed. 22551 bytes written.
# wp admin-menu-editor export --output
{"tree":{"index.php":{"position":0,"template_id":">index.php","items":... (+ more code)

import

Import admin menu configuration from a JSON file.

# wp admin-menu-editor import menudata.json
Success: Import completed.

Tips

This command will overwrite your existing menus without asking for confirmation, so make a backup first.