Resetting WP Password for super user on AWS LightSail
Since this is my attempt at beginning a rudimentary tech blog via WordPress, it only seems appropriate that my first post be about WordPress itself! Upon revisiting this blog, I realized that not only had LastPass not saved my user settings, I also didn’t have SMTP properly setup so I couldn’t reset my password.
Step 1: Log into machine
From the AWS Lightsail dashboard, log into your machine via SSH:
You may want to cat out your super user password for the next few commands if you don’t have it memorized:
cat bitnami_application_password
Step 2: Run mysql queries from terminal
Next you need to identify your user id:
mysql -u root -p bitnami_wordpress -e "SELECT * FROM wp_users;"
And finally, update your password:
mysql -u root -p bitnami_wordpress -e "UPDATE wp_users SET user_pass=MD5('NEWPASS') WHERE ID=2;"
References: