How to reset WordPress password through MySQL command line

Here is I will show you how to reset password for WordPress dashboard

For example we have database with name test_test

Enter shell and run

mysql
use test_test;
show tables;

We will see something like

+———————–+
| Tables_in_test_test  |
+———————–+
| wp_commentmeta        |
| wp_comments           |
| wp_links              |
| wp_options            |
| wp_postmeta           |
| wp_posts              |
| wp_styles             |
| wp_term_relationships |
| wp_term_taxonomy      |
| wp_terms              |
| wp_usermeta           |
| wp_users              |
| wp_wct_cron           |
| wp_wct_fields         |
| wp_wct_relations      |
| wp_wct_setup          |
+———————–+
16 rows in set (0.00 sec)

select * from wp_users;

If you have only one record just run

update wp_users set user_pass = MD5("new_password") where id = 1;

id = 1must match to the account for which you want to reset password

Enjoy

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *