{"id":448,"date":"2013-03-01T08:46:35","date_gmt":"2013-03-01T08:46:35","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=448"},"modified":"2013-03-01T08:46:35","modified_gmt":"2013-03-01T08:46:35","slug":"wordpress-reset-your-admin-password-using-command-line-quick-way","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/wordpress-reset-your-admin-password-using-command-line-quick-way\/","title":{"rendered":"WordPress – reset your admin password using Command line (quick way)"},"content":{"rendered":"

Sometimes, you lose your credential to your wordpress admin dashboard, i guess many of you had this question in mind : what is the quickest way to reset my admin password ?<\/p>\n

\"error-wp1\"<\/p>\n

In WordPress, there is more than one way to set your password. In normal circumstances, you can do it through the WordPress interface. If you forget your password, WordPress has a built in recovery mechanism that uses email.<\/p>\n

But on some hosts, especially when email isn’t working right, sometimes you have to take different steps to reset your password. in this article, i’ll show you how to reset you admin password using command line:<\/p>\n

1. log in to MySQL<\/p>\n

\nmysql -u root -p\n<\/pre>\n

<\/p>\n

enter your mysql password, then select WordPress database<\/p>\n

\nuse (name-of-database)\n<\/pre>\n

look for a table name with “users” at the end :<\/p>\n

\nshow tables;\n<\/pre>\n

find your admin user:<\/p>\n

\nSELECT ID, user_login, user_pass FROM (name-of-table-you-found)\n<\/pre>\n

reset user password:<\/p>\n

\nUPDATE (name-of-table-you-found) SET user_pass=MD5('your-desired-passowrd') WHERE ID = (id#-of-account-you-are-reseting-password-for)\n<\/pre>\n

to see the result (not really necessary), execute this query:<\/p>\n

\nSELECT ID, user_login, user_pass FROM (name-of-table-you-found)\n<\/pre>\n

(type Control-D, to exit mysql client)<\/p>\n","protected":false},"excerpt":{"rendered":"

Sometimes, you lose your credential to your wordpress admin dashboard, i guess many of you had this question in mind : what is the quickest way to reset my admin password ? In WordPress, there is more than one way to set your password. In normal circumstances, you can do it through the WordPress interface….<\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60,45,31],"tags":[49,62,51,85],"aioseo_notices":[],"views":5,"_links":{"self":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/448"}],"collection":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/comments?post=448"}],"version-history":[{"count":0,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/posts\/448\/revisions"}],"wp:attachment":[{"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/media?parent=448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/categories?post=448"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ndthanh.com\/wp-json\/wp\/v2\/tags?post=448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}