How to Reset WordPress Password Using MySQL Command Prompt – WPSaviour

By WP Saviour •  Updated: 02/24/21 •  5 min read
  1. 1. How To Reset Your WordPress Password Utilizing phpMyAdmin
  2. 2. At the moment Studying: The way to Reset WordPress Password Utilizing MySQL Command Immediate

Our WordPress Password Restoration sequence is sorted in response to the recognition of the tutorial talked about. For starters, you’ve got have the most well-liked restoration possibility – i.e. utilizing phpMyAdmin.

There are specific website hosting suppliers who don’t present cPanel and/or phpMyAdmin. What do you do then? Learn this text!


Relaxation assured, since WordPress used one database – (generally MySQL), each internet hosting supplier will need to have a Database Administration System higher often known as DBMS. On this tutorial, we’ll be utilizing the MySQL command immediate (abbreviated as CMD) which is a free DBMS as licensed below GNU Normal Public License v2.


Recovering your password utilizing the MySQL CMD entails lesser variety of steps and will be considered an common password restoration system; within the sense that it may be utilized in nearly any believable state of affairs.

Nevertheless,  you want to have a working understanding of databases and the way WordPress interacts with one. Other than that, you additionally must know the next technical features:

Logging in to the MySQL Command Immediate

Home windows

If you happen to’re working an offline set up of WordPress in Home windows utilizing WAMP or XAMPP, then to launch the MySQL CMD, click on on the WAMP icon > MySQL > MySQL console. This immediately logs you in. There’s no must enter any extra instructions. Head over to the following step.



Most shared internet hosting suppliers, VPS, devoted servers use a variant of Linux which embody CentOS, Debian, Fedora or Ubuntu to call a number of.

If you’re working an offline set up of WordPress in Linux utilizing LAMP, then merely launch terminal emulator and kind the command:

mysql -u root -p

If you happen to’re making an attempt to reset the password in a distant server, connect with it by way of SSH utilizing any SSH consumer – for instance, the world’s favourite consumer – Putty. Upon getting logged in to the distant server, to login to MySQL, use the next command:

mysql -u root -p <password>


Resetting the WordPress Password:

Now that you’ve entry to the MySQL CMD indicated by the “mysql >” immediate, its time to work the magic. Effectively, not magic – simply good ol’ MySQL instructions. ?




Enter the next instructions ditto:

use wp_genesis;
SELECT ID, user_login, user_pass FROM wp_users;
UPDATE wp_users SET user_pass = MD5(‘WPSAVIOUR’) WHERE ID=1 LIMIT 1;

In case the final command doesn’t go in response to the screenshot, delete the the only quotes and manually sort them within the CMD. That ought to do the trick.


This can reset the password of the admin consumer to WPSAVIOUR. In fact, whereas setting a brand new password, you’ll have to make use of a stronger one. As soon as executed, you possibly can exit the MySQL CMD through the use of the command:


Video Tutorial

Right here’s a video tutorial describing all the course of. I’d suggest studying the article first, however in the event you’re on the lookout for a fast repair, that is your queue:



In conclusion to our WordPress Password Restoration sequence I’d prefer to remind you that half (a) is easier as a result of 90% of the internet hosting firms include phpMyAdmin. However in case you have some free time, I’d suggest making an attempt out this half (utilizing MySQL) because it’ll provide you with some expertise in dealing with MySQL instructions and databases. And who is aware of – possibly it’ll be of some use sooner or later!

Prevention is best than The remedy


I began this sequence off by saying how password saving/backup providers like LastPass thrive. Don’t get me flawed – it wasn’t my intention to come back throughout as demeaning. I truly love and use LastPass on a regular basis. I’ve it put in in my telephone and in each browser in all my computer systems. Life (for me) would come to a stand-still with out it.  Actually, I can’t survive with out it.

LastPass, because it is likely one of the most full and user-friendly password administration software program on the market. I’d extremely suggest utilizing it. And each time you login to a brand new web site, be sure you truly save the password!

WP Saviour