wp user meta list

Lists all metadata associated with a user.

wp user meta list <user> [--keys=<keys>] [--fields=<fields>] [--format=<format>] [--orderby=<fields>] [--order=<order>] [--unserialize]

Options

<user>

The user login, user email, or user ID of the user to get metadata for.

[--keys=<keys>]

Limit output to metadata of specific keys.

[--fields=<fields>]

Limit the output to specific row fields. Defaults to id,meta_key,meta_value.

[--format=<format>]

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

Options:
  • table
  • csv
  • json
  • count
  • yaml

[--orderby=<fields>]

Set orderby which field. [Default: id]

Options:
  • id
  • meta_key
  • meta_value

[--order=<order>]

Set ascending or descending order. [Default: asc]

Options:
  • asc
  • desc

[--unserialize]

Unserialize meta_value output.

Examples

# List user meta $ wp user meta list 123 --keys=nickname,description,wp_capabilities +---------+-----------------+--------------------------------+ | user_id | meta_key | meta_value | +---------+-----------------+--------------------------------+ | 123 | nickname | supervisor | | 123 | description | Mary is a WordPress developer. | | 123 | wp_capabilities | {"administrator":true} | +---------+-----------------+--------------------------------+