wp user

Manage users.

GitHub Issues

EXAMPLES

# List user IDs
$ wp user list --field=ID
1

# Create a new user.
$ wp user create bob bob@example.com --role=author
Success: Created user 3.
Password: k9**&I4vNH(&

# Update an existing user.
$ wp user update 123 --display_name=Mary --user_pass=marypass
Success: Updated user 123.

# Delete user 123 and reassign posts to user 567
$ wp user delete 123 --reassign=567
Success: Removed user 123 from http://example.com

SUBCOMMANDS

Name Description
wp user add-cap

Add a capability to a user.

wp user add-role

Add a role for a user.

wp user create

Create a new user.

wp user delete

Delete one or more users from the current site.

wp user generate

Generate some users.

wp user get

Get details about a user.

wp user import-csv

Import users from a CSV file.

wp user list

List users.

wp user list-caps

List all capabilities for a user.

wp user meta

Manage user custom fields.

wp user remove-cap

Remove a user’s capability.

wp user remove-role

Remove a user’s role.

wp user session

Manage a user’s sessions.

wp user set-role

Set the user role.

wp user term

Manage user terms.

wp user update

Update an existing user.