Reset the WordPress administrator password

First, obtain the user ID for the WordPress administrator account from the command line:

$ mysql -u root -p bitnami_wordpress -e "SELECT * FROM wp_users;"

Then, use the command below to reset the administrator password from the command line. Remember to replace the NEWPASSWORD placeholder with your desired password and the ADMIN-ID placeholder with the user ID obtained from the first command.

$ mysql -u root -p bitnami_wordpress -e "UPDATE wp_users SET user_pass=MD5('NEWPASSWORD') WHERE ID='ADMIN-ID';"
Last modification February 9, 2021