Note: If you can’t find WP-CLI in the User Portal, please note that WP-CLI is currently only available to a limited group of users. We are currently working on a long-term launch plan that will broaden access to more customers.
This page will be updated as we resolve issues.
Unsupported Commands
The following commands are unsupported in our web console version of WP-CLI:
cli update
cli check-update
core multisite-convert
db check
db optimize
db repair
db cli
db drop
db create
eval
eval-file
shell
scaffold plugin-tests
The following commands have known issues, and should not be used at this time:
menu item
db query
plugin uninstall
post create
post edit
rewrite flush [--hard]
user import-csv
widget update
plugin is-installed
theme is-installed
cache type
Invalid or unsupported command Error
If you receive “Invalid or unsupported command” messages from the command prompt while running a command, please contact support.
Long Queries in wp db
If you try to run a query that is longer than 1024 characters you may receive the following message:
Error: It looks like you’re trying to perform a long query. For performance reasons, our system is optimized to not allow long queries. If you need this query run, you can contact our Support team or set the following wp-config.php option and rerun your query:
define( ‘WPE_GOVERNOR’, false );
After setting the above wp-config.php option we recommend you remove this entry after you run your needed command.
Documentation Syntax
Due to the nature of our web console interface, If you are running a command that requires confirmation, you should always use the --yes
flag to provide that confirmation.
The following commands require somewhat different syntax than is shown in the help command syntax:
Command | Correct syntax |
wp media regenerate [<attachment-id>...] [--yes] | --yes parameter is required |
wp site create --slug=<slug> [--title=<title>] [--email=<email>] [--network_id=<network-id>] [--private] [--porcelain] | Example: wp site create --slug=test-2 |
wp site delete [<site-id>] [--slug=<slug>] [--yes] [--keep-tables] | Example: wp site delete 17 |
wp term create <taxonomy> <term> [--slug=<slug>] [--description=<description>] [--parent=<term-id>] [--porcelain] | Example: wp term create category Apple |
wp theme disable <theme> [--network] | Multisite only: Example: wp theme disable twentyfifteen |
wp theme enable <theme> [--network] [--activate] | Multisite only: Example: wp theme enable twentythirteen --activate |
wp theme get <theme> [--field=<field>] [--format=<format>] | Multisite only: Example: wp theme get twentytwelve --format=json |
wp user add-cap <user> <cap> | Example: wp user add-cap joeuser create_premium_item |
wp user add-role <user> <role> | Example: wp user add-role joeuser author |
wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>] [--user_registered=<yyyy-mm-dd>] [--display_name=<name>] [--first_name=<first_name>] [--last_name=<last_name>] [--send-email] [--porcelain] | Example: wp user create joeuser [email protected] --role=author |
wp user delete <user>... [--network] [--reassign=<user-id>] [--yes] | Example: wp user delete ID --yes |
wp user get <user> [--field=<field>] [--fields=<fields>] [--format=<format>] | Example: wp user get joeuser |
wp user list [--role=<role>] [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>] | Example: user list --role=author |
wp user list-caps <user> | Example: wp user list-caps joeuser |
wp user meta <command> | Example: wp user meta update admin first_name "Joe" |
wp user remove-cap <user> <cap> | Example: wp user remove-cap joeuser edit_themes |
wp user remove-role <user> [<role>] | Example: wp user remove-role joeuser author |
wp user set-role <user> [<role>] | Example: wp user set-role joeuser author |
wp user update <user>... --<field>=<value> | Example: wp user update joeuser --display_name=Joe --user_pass=examplepassword |
widget add <name> <sidebar-id> [<position>] [--<field>=<value>] | Example: wp widget add rss sidebar-1 |
wp widget deactivate <widget-id>... | Example: wp widget deactivate search-2 |
wp widget delete <widget-id>... | Example: wp widget delete calendar-3 |
wp widget list <sidebar-id> [--fields=<fields>] [--format=<format>] | Example: wp widget list sidebar-1 |
wp widget move <widget-id> [--position=<position>] [--sidebar-id=<sidebar-id>] | Example: wp widget move calendar-1 --sidebar-id=sidebar-1 |
--url=<url> | Multisite only |