illmob.org

WordPress Password Reset From Command Line

September 23rd, 2008 by Dev Team in News, Password Info

You just got WordPress installed and completely forgot to change the random password? To change it, open a terminal and change the password field for the account you just created in mysql.  Here’s how:

First you’ll need to get your password encrypted using openssl.

$ # openssl passwd -1 my_super_secret_password

$1$AIO1MlAJ$nTI.HbEKpuYRbtCpn.5Vu/

Copy this hash so you can paste it into your sql statement later.  Now connect to mysql.

$ mysql -u root -p

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 976

Server version: 9.7.6evil Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql>

If you know the database name you can just connect to it, if your forgot, which I did, just list them all.

mysql> show databases;

Connect to your wordpress database.

mysql> connect my_wordpress_database_name;

And change the password.

mysql> update wp_users

-> set user_pass=’$1$AIO1MlAJ$nTI.HbEKpuYRbtCpn.5Vu/’

-> where user_login=’admin’;

And that’s it; all done.  Now you can get back to editing…

3 Responses to ' WordPress Password Reset From Command Line '

Subscribe to comments with RSS or TrackBack to ' WordPress Password Reset From Command Line '.


  1. on October 16th, 2008 at 8:18 am

    […] here if you want to see the article i found. I thank that site manys. Thursday, October 16th, 2008 […]

  2. Anonymous said,

    on October 24th, 2008 at 4:33 pm

    You site is good site.

    Hi show my links please:


  3. on August 21st, 2009 at 9:17 pm

    […] Here is the perfect webpage to tell you how to do just that: http://www.whatsmypass.com/wordpress-password-reset-from-command-line […]

Leave a reply