Actions
Creating an Administrator User in WordPress Using WP-CLI¶
wp user create NEW-USER-NAME MAIL@example.com --role=administrator --user_pass=YOUR-PASSWORD
You can replace...
"NEW-USER-NAME" with the desired username,
"MAIL@example.com" with the email address for the new user,
and "YOUR-PASSWORD" with the desired password for the new user,
and "administrator" with the desired role for the new user.
Updated by Gareth Eaton about 1 year ago · 2 revisions