Skip to content

Cookbook › WP-CLI

Add a user or change a role with WP-CLI

WP-CLI1 minuteChangesTested 15 Oct 2026
Paste into ChatGPT or ClaudeUse WP-CLI to create a user “maria” with the email maria@example.com and the Editor role. Then list all editors.

Changes your site. Standard asks you first in wp-admin; Trusted does it directly.

  1. Your assistant runs wp user create maria maria@example.com --role=editor.
  2. WordPress creates the account. Maria sets her own password with “Lost your password?” on the login page.
  3. It runs wp user list --role=editor to show the result.
  • “Make Sam an Author instead of an Editor.”
  • “Delete the user ‘test’ and give their posts to Maria.”
  • The WordPress user your assistant acts as needs permission to manage users.
  • Passwords are never shown or set by your assistant.