wp user

Manages users, along with their roles, capabilities, and meta.

See references for Roles and Capabilities and WP User class.

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.