How to add users and update password in WordPress through SSH

Posted on: January 23rd, 2024
By: Tadeo Martinez

Here’s how to create a user:

wp user create username email@example.com --role=administrator

Replace usernameemail@example.com, and administrator with your desired values.

--role defines the user’s permission level (administrator for full access).

Reset Password

How to reset the password of the newly created user.

wp user update ID --user_pass=new_password

Delete User

wp user delete ID --reassign=new_user

Don’t forget to use the –reassign, otherwise important information from the website might be lost.

Update User Email

wp user update ID --user_email='newemail@example.com'

Update Site Title

wp option get blogname

Update Tagline

wp option update blogdescription "New Tagline"

Update Admin Email

wp option set admin_email 'new@gmail.com'

Have any questions or comments? Write them below!


Leave a Reply

Your email address will not be published. Required fields are marked *