wp cli alias <command>

Retrieves, sets and updates aliases for WordPress Installations.

Aliases are shorthand references to WordPress installs. For instance, @dev could refer to a development install and @prod could refer to a production install. This command gives you and option to add, update and delete, the registered aliases you have available.


# List alias information.
$ wp cli alias list
@all: Run command against every registered alias.
  user: wpcli
  path: /Users/wpcli/sites/testsite

# Get alias information.
$ wp cli alias get @dev
ssh: dev@somedeve.env:12345/home/dev/

# Add alias.
$ wp cli alias add @prod --set-ssh=login@host --set-path=/path/to/wordpress/install/ --set-user=wpcli
Success: Added '@prod' alias.

# Update alias.
$ wp cli alias update @prod --set-user=newuser --set-path=/new/path/to/wordpress/install/
Success: Updated 'prod' alias.

# Delete alias.
$ wp cli alias delete @prod
Success: Deleted '@prod' alias.

Top ↑


Name Description
cli alias is-group
wp cli alias add

Creates an alias.

wp cli alias delete

Deletes an alias.

wp cli alias get

Gets the value for an alias.

wp cli alias list

Lists available WP-CLI aliases.

wp cli alias update

Updates an alias.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.