{"id":5491,"date":"2020-03-17T15:00:30","date_gmt":"2020-03-17T14:00:30","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=5491"},"modified":"2020-11-19T10:30:40","modified_gmt":"2020-11-19T09:30:40","slug":"how-to-reset-wordpress-password","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-reset-wordpress-password\/","title":{"rendered":"How to Reset a WordPress Password From the Database"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]At times when we cannot access our dashboard due to either forgetting or getting our password changed by someone else, it is good to have alternative ways of altering it. There are <strong>multitudes of methods to reset or change a password for your user&#8217;s login into the WordPress dashboard<\/strong>. These include the &#8216;Lost your password?&#8217; link on the login page, the automatic emailer, via FTP and many more. There are even <strong>two different ways of changing a password through phpMyAdmin alone<\/strong>, that is by using a MySQL command line, and through editing the \u201cusers\u201d table within phpMyAdmin options. In this article, we will cover both methods for changing the user\u2019s password from the database.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Accessing Your Database<\/h2>\n<p>[\/vc_column_text][vc_column_text]In order to start editing anything, naturally, we will first need to access it. To <strong>access the database<\/strong>, if you&#8217;re working on a live server, you will either have to <strong>contact your hosting provider, or access your cPanel and navigate to phpMyAdmin<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin.jpg\" class=\"attachment-full size-full\" alt=\"phpMyAdmin\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]If you&#8217;re working on a local server you can go to the designated dashboard for it, we will be using the XAMPP control panel, and <strong>press the admin button for MySQL<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"358\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/Press-the-admin-button-for-MySQL.jpg\" class=\"attachment-full size-full\" alt=\"Press the admin button for MySQL\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/Press-the-admin-button-for-MySQL.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/Press-the-admin-button-for-MySQL-300x151.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/Press-the-admin-button-for-MySQL-620x313.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Once you have done any of these you will be redirected to the phpMyAdmin dashboard page on your default browser.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-dashboard-G.jpg\" class=\"attachment-full size-full\" alt=\"phpMyAdmin dashboard\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-dashboard-G.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-dashboard-G-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/02\/phpMyAdmin-dashboard-G-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]On the left-hand side of the page, you will see a list of your databases. <strong>Choose the one to which you are trying to log in<\/strong> by simply clicking on it. Once you choose the database you\u2019d like edited you should <strong>see the overview of its tables<\/strong>. To change a password for a user, you will need to <strong>access the &#8216;users&#8217; table<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Don\u2019t be discouraged if the prefix for the tables is different. WordPress sets wp_ as the default but there are a few ways to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-change-wordpress-database-prefix\/\">change this table prefix within your database<\/a>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The important part now, when it comes to changing the password, is that you <strong>select the &#8216;users&#8217; table by clicking either its name or the Browse link within that row<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Changing-the-password.jpg\" class=\"attachment-full size-full\" alt=\"Changing the password\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Changing-the-password.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Changing-the-password-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Changing-the-password-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]You should be taken to the \u2018users\u2019 table overview that looks something like this:[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Users-table-overview.jpg\" class=\"attachment-full size-full\" alt=\"Users table overview\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Users-table-overview.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Users-table-overview-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Users-table-overview-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]If you have more users on your website, naturally, there will be more rows within the table.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The password column can be<strong> edited from here by simply double-clicking the field<\/strong>, however, this represents the encoded version of the password and the browser will not recognize it as the same password if you simply typed in for example \u201c4dm1n\u201d.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The subsequent steps for changing the password will vary depending on whether you\u2019d like to use SQL code through the MySQL command line to alter the tables or you prefer doing that by hand through phpMyAdmin data table options.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Reset WordPress Password using MySQL Command Line<\/h2>\n<p>[\/vc_column_text][vc_column_text]Now that you are situated within the database that you\u2019d like to edit and its \u201cusers\u201d table, <strong>click the SQL tab shown near the top of the browser window<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/SQL-tab-1.jpg\" class=\"attachment-full size-full\" alt=\"SQL tab\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/SQL-tab-1.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/SQL-tab-1-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/SQL-tab-1-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]A new form should be presented with a text area where you can <strong>replace the existing line of code<\/strong>:[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">SELECT * FROM `wp_users` WHERE 1<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;18px&#8221;][vc_column_text]with the following line of code[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;][vc_column_text]<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">UPDATE `wp_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='yourusername';<\/pre>\n<p>[\/vc_column_text][vc_empty_space height=&#8221;18px&#8221;][vc_column_text]Please make sure to <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-backup-wordpress-database\/\">backup your database<\/a> before continuing any further since a mistake within the code can cause an unexpected database error. Also, make sure to <strong>leave the single quotes as in the example of the code above<\/strong>, otherwise, the code will not work. Lastly, please make sure you <strong>leave the password within the MD5 brackets<\/strong> since the MD5 setting uses one of WordPress\u2019 early encoding algorithms that has since been replaced, and because of this, the first time you attempt to log in WordPress will use a newer encryption algorithm on the password you entered preserving it for use as if you have set it up from the WordPress registration page.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Now, once you have switched out the &#8216;yourusername&#8217; with the user name of the user you\u2019re changing the password to, and &#8216;yourpassword&#8217; with the password you\u2019d like to use in the future, you should <strong>click the GO button in the lower right corner<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Switched-out-the-yourusername.jpg\" class=\"attachment-full size-full\" alt=\"Switched out the yourusername\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Switched-out-the-yourusername.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Switched-out-the-yourusername-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Switched-out-the-yourusername-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;60px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/GO-button-1.jpg\" class=\"attachment-full size-full\" alt=\"GO button\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/GO-button-1.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/GO-button-1-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/GO-button-1-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]This code, once run, will search, within the \u201cusers\u201d table, for the username that you input and replace that user&#8217;s password with the one that you chose. If this action was successful <strong>you should get a green bar near the top of the screen<\/strong> indicating that exactly one row has been affected by this action.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Action-was-successful.jpg\" class=\"attachment-full size-full\" alt=\"Action was successful\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Action-was-successful.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Action-was-successful-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Action-was-successful-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Now you can<strong> navigate to your login page and use the newly changed password<\/strong> for the, in this example, \u201cadmin\u201d user.[\/vc_column_text][vc_empty_space height=&#8221;81px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;50px&#8221;][vc_widget_sidebar sidebar_id=&#8221;top-picks-banner&#8221;][vc_empty_space height=&#8221;28px&#8221;][vc_separator color=&#8221;custom&#8221; accent_color=&#8221;#f0f0f0&#8243;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">How to Reset a WordPress Admin Password from phpMyAdmin<\/h2>\n<p>[\/vc_column_text][vc_column_text]If, however, you\u2019d like to change the password manually you should <strong>locate the user you\u2019d like to change the password for, and click the edit link<\/strong> next to the pencil icon.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Change-the-password-manually.jpg\" class=\"attachment-full size-full\" alt=\"Change the password manually\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Change-the-password-manually.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Change-the-password-manually-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/Change-the-password-manually-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]Once you have done this a form will show up that will allow you to set and edit various fields pertaining to the user. One of which is the<strong> user_pass field which we will be looking to edit<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"378\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/User_pass-field.jpg\" class=\"attachment-full size-full\" alt=\"User_pass field\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/User_pass-field.jpg 710w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/User_pass-field-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2020\/03\/User_pass-field-620x330.jpg 620w\" sizes=\"auto, (max-width: 710px) 100vw, 710px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]As you can see in the image above, we have <strong>changed the value of the function dropdown in the user_pass row to MD5<\/strong>. Then we <strong>added the password we want to use<\/strong> for accessing the dashboard in the text field next to it.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The reason we had to change the function dropdown is precisely the password encoding we mentioned previously. As previously noted, the MD5 setting uses one of WordPress\u2019 early encoding algorithms that has since been replaced, because of this, the first time you attempt to log in WordPress will use a newer encryption algorithm on the password you entered preserving it for use as if you have set it up from the WordPress registration page.[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Final Thoughts<\/h2>\n<p>[\/vc_column_text][vc_column_text]This concludes the steps needed to change your password via the phpMyAdmin and by using SQL code within the database. We hope that by using this guide you will be able to restore control over your installation and not lose the valuable hours spent on setting your website up.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>In this article, we will show you how to reset a WordPress password from the database using a MySQL command line or phpMyAdmin options.<\/p>\n","protected":false},"author":278,"featured_media":8043,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[34,4,13],"class_list":["post-5491","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-security","tag-tips","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/5491","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/278"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=5491"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/5491\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/8043"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=5491"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=5491"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=5491"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}