{"id":379,"date":"2019-04-16T10:23:36","date_gmt":"2019-04-16T10:23:36","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2019\/04\/16\/reset-magento-2-admin-password\/"},"modified":"2025-05-22T16:58:17","modified_gmt":"2025-05-22T11:28:17","slug":"reset-magento-2-admin-password","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/reset-magento-2-admin-password\/","title":{"rendered":"How to Reset Magento 2 Admin Password"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are a Magento 2 store admin, you know the importance of strong passwords! It helps prevent unauthorized access to the admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Security experts recommend <a href=\"https:\/\/meetanshi.com\/free-tools\">using strong unique passwords<\/a>, however, it is the least followed recommendation because unless you know the trick, it is impossible to remember it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That does not mean you make the unauthorized access easier in Magento 2 admin panel. Go on with a strong and unique password. In case you forget it, I have your back \ud83d\ude03<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can follow any of the below methods to <i>reset Magento 2 admin password<\/i> when you forget it!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Methods to Reset Magento 2 Admin Password:<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1. Reset the Magento 2 admin password via the command line<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php bin\/magento admin:user:create --admin-user=admin --admin-password=admin123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Enter email,&nbsp;&nbsp;first name, and last name<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2019\/04\/reset-admin-password-command.png\" alt=\"Method to Reset the Magento 2 admin password via the command line\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The above command is for creating a new user but you can also use it to reset the admin password in Magento 2 if the user is already available.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2. Reset Magento 2 admin password via Email<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Change Magento 2 admin password using the default recovery system.<\/li>\n\n\n\n<li>Go to &#8220;Admin Panel&#8221;<\/li>\n\n\n\n<li>Click &#8220;Forgot Password&#8221;<\/li>\n\n\n\n<li>Enter the Email address and click the &#8220;Retrieve password&#8221; button.<\/li>\n\n\n\n<li>Easily set new password with the reset password link received in the Email.This method is useful when you have forgotten the password and want to reset it.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Method 3. Reset Magento 2 admin password from Account Settings:<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Login<\/strong> to admin panel<\/li>\n\n\n\n<li>Go to <strong>Account Settings<\/strong> as shown in the figure.<\/li>\n\n\n\n<li>Enter the <strong>new password<\/strong><\/li>\n\n\n\n<li>Enter it again to <strong>confirm<\/strong> the change in password.<\/li>\n\n\n\n<li>Enter your <strong>old password<\/strong> to confirm your identity.<\/li>\n\n\n\n<li><strong>Save Accounts<\/strong>.This method is useful when you remember the old password and simply want to reset it.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2019\/04\/1_reset-admin-password-from-Account-settings-1-1024x648.png\" alt=\"1_reset admin password from Account settings\" class=\"wp-image-4981\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">method is useful when you remember the old password and simply want to reset it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 4. Reset Magento 2 admin password via phpMyAdmin<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to phpMyAdmin<\/li>\n\n\n\n<li>Go to the Database section and search for the admin_user table<\/li>\n\n\n\n<li>Run the below query as shown in the figure:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>UPDATE admin_user SET password = SHA2('NewPassword', 256) WHERE username='admin';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2019\/04\/SQL-Query-PhpMyAdmin-password-reset-method-Meetanshi_1-1024x324.png\" alt=\"SQL Query - PhpMyAdmin password reset method - Meetanshi_1\" class=\"wp-image-5967\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">That was all about changing the Magento 2 admin password.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a Magento 2 store admin, you know the importance of strong passwords! It helps prevent unauthorized access to the admin panel. Security&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-379","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=379"}],"version-history":[{"count":5,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions"}],"predecessor-version":[{"id":15469,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/379\/revisions\/15469"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}