wp_create_user
Create a WordPress user with a specified role and password, using dry-run mode to preview before making changes.
Instructions
Create a WordPress user with a role and a password.
username cannot be changed later (WordPress forbids it) and email must not
already be in use. roles is a role slug or a list of them ('subscriber',
'editor', 'administrator', ...); omit it and WP applies the site's default role.
THE PASSWORD IS NEVER ECHOED BACK - it is sent to the site and replaced by a marker
in every preview and result, so it does not end up in this transcript. Choose a
strong one and record it in your password manager BEFORE calling: this server
cannot show it to you afterwards. DEFAULTS TO dry_run=true (returns a preview;
creates nothing). Pass dry_run=false to create. Requires the REST transport and an
administrator app password. Prod writes require allow_prod=true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| Yes | |||
| roles | No | ||
| dry_run | No | ||
| install | Yes | ||
| password | Yes | ||
| username | Yes | ||
| allow_prod | No |