wp user get

Gets details about a user.

wp user get <user> [--field=<field>] [--fields=<fields>] [--format=<format>]

Options

<user>

User ID, user email, or user login.

[--field=<field>]

Instead of returning the whole user, returns the value of a single field.

[--fields=<fields>]

Get a specific subset of the user's fields.

[--format=<format>]

Render output in a particular format. [Default: table]

Options:
  • table
  • csv
  • json
  • yaml

Examples

# Get user $ wp user get 12 --field=login supervisor # Get user and export to JSON file $ wp user get bob --format=json > bob.json