Change Wordpress Password

Hello i have a site and installed Wordpress with one click install, but I did forget the password, how can I change the password for admin

  1. Via Password forget via Wordpress
  2. wp user reset-password – WP-CLI Command | Developer.WordPress.org
  3. Directly via DB

Or any other method listed here:

1 Like

i did try this but it is not working

That answer doesn’t help us to help you :stuck_out_tongue:

Let’s say your Hestia user is abraham and your domain is example.net

If you are not logged as root yet:

sudo su -

Once you are root:

v-add-user-wp-cli abraham

When executing above command, if you see this error; Error: For user name 'abraham' WP-CLI already available! then wp cli is already installed for your user so there is no problem, and you can continue.

v-change-user-shell abraham bash
su - abraham

Now you are logged as user abraham:

cd web/example.net/public_html/
export PATH="~/.wp-cli/:$PATH"
wp user reset-password admin --skip-email --porcelain

Above command will show you the new password for user admin, copy and save it.

Now logout from user abraham.

logout

Now you are root again, so remove the shell for the user abraham:

v-change-user-shell abraham nologin
1 Like

thank you, it worked

2 Likes