You have to be under the public_html folder.
wp user create admin email@example.com --role=administrator
Roles: ‘administrator’, ‘editor’, ‘author’, ‘contributor’, ‘subscriber’.
Here’s the WordPress documentation on wp user create command.
Learn How to connect to SSH with terminal here.
How to display all the users
wp user list
To update the user password
wp user update user_id --user_pass=password
To delete a user and reassigned their content to another user (recommended)
wp user delete username --reassign=anotherusername
If you simply want to delete a user (not recommended)
wp user delete username
Have any questions or comments? Write them below!