Every new hosting plan ordered during JUL2019 can request free DNSSEC setup ($39 value). Use coupon JUL2019 for free DNSSEC ($39 value).
Dominate local SEO with a regional SlickStack cloud server for just $39/month! Order Now
250,000+ sites use our plugins! Become A Member

Reset WordPress User Password Via Shell (SSH)

Jesse Nickles   |  15 Nov, 2015

Oh, snap… you’ve forgotten your WordPress admin password and the other password reset features are for some reason not an option. Lucky for you, there’s a surprisingly easy way to reset any WordPress user’s password using shell (SSH) access to your server, by accessing MySQL directly using a few powerful command line tools…

After you login to your web server via SSH, simply connect to MySQL using the below command:

mysql -u root -p

After you enter the password for MySQL’s root user, specify the database where you’ve installed WordPress (below). We are going to check to verify which users (and tables) exist before resetting our user’s password:

use wordpress
show tables;

After inputting the above set of commands, you should see several tables listed in your SSH window that begin with wp_ if you have a typical default WordPress installation. Specifically, you should also see a wp_users table in most cases, although the prefix may differ. Next, we want to view the actual list of users in this WordPress installation:

SELECT ID, user_login, user_pass FROM wp_users;

The above command will display a list of the users (accounts) that are part of the given WordPress installation. Be sure to change wp_users to the appropriate prefix as needed for your installation. Next, make sure you are aware of the ID (number) of the username whose password you want to change, then input the below command (be sure to encode your desired password using a free MD5 generator, otherwise it will not work as the passwords table in WordPress is set to MD5):

UPDATE wp_users SET user_pass="[MD5-string]" WHERE ID = 12345;

To verify that your user password has been successfully changed/updated, re-input the following:

SELECT ID, user_login, user_pass FROM wp_users;

If the MD5 hash code appears properly for your user in the list, you are done! Before exiting MySQL command line, be sure to test your new username/password combination by trying to login via the WordPress admin panel.


Tags: , , , , , ,

Last modified: 15 Jan, 2016https://www.littlebizzy.com/?p=4986

Results For Local Business, High Traffic, And E-Commerce.

Local Business

"After being hosted on GoDaddy for years, I didn't realize how negatively it was impacting my search traffic. Soon after moving to LittleBizzy, my homepage went from page 3 on Google to #1 world-wide for my target market, and I also reached the top 3 on Google Maps, with no additional SEO work."

Juliette S.

High Traffic

"Before moving to LittleBizzy, whenever our news website was featured on the Drudge Report, it often slowed to a crawl or even froze up during big traffic spikes. Now, that never happens anymore, and we've been able to focus on publishing more articles instead of worrying about our web hosting."

Tony H.


"The research by Amazon is definitely true, because our slow WooCommerce store was bleeding sales. After LittleBizzy stabilized our performance and moved us closer to our target customers, we saw a measurable improvement in shopping cart checkouts, esp. during holidays... much better!"

Mohammed H.

No contracts, free migration, and free SSL forever. What are you waiting for? Order Hosting Now.

WordPress Gossip, Technical SEO News, And Other Goodies.

Free. Unsubscribe anytime.

Brands That Trust Our Software: