4 Ways to Reset Admin password in Magento 2

4 Ways to Reset Admin password in Magento 2
Drive 20-40% of your revenue with
email, SMS marketing
avada email marketing

User Name and Password are the required fields if you want to log in the Magento admin. And it is the huge trouble if you forget one of them. Therefore, resetting admin password is very essential to every store. With Magento 2, “Forgot your password” link is available to click, then a temporary password can be sent to the email address that is associated with the account immediately. If the admin account get lock, this tutorial will help. Let do the following steps to reset your admin password in Magento 2.

To reset Magento 2 admin password

There are 3 way to reset the admin password in Magento2:

Related Topics:

Solution 1: Reset Magento 2 admin password in phpmyadmin

Go to phpmyadmin and copy the following sql query:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxYourNewPassword', 256), ':xxxxxxx:1') WHERE username = 'admin';

The xxxxxxx character sequence is a cryptographic salt, it is saved in app\etc\env.php file

return array (
  'crypt' => 
  array (
    'key' => '525701df74e6cba74d5e9a1bb3d935ad', //cryptographic salt

Solution 2: Reset your Magento 2 password from Admin panel

  • If you forget your password, click hte Forgot Your Password? link.

How to reset admin password Magento 2 Forgot Password

  • Enter the Email Address that is associated with the Admin account.
  • Click  Retrieve Password. If there is an account associated with the email address, an email will be sent to reset your password. To prevent email to spam box, enable SMTP here

Solution 3: Reset Magento 2 admin password via command line (cli)

We typed on Magento 2 root folder:

php bin/magento -h

It show the admin command line:

  admin:user:create                        Creates an administrator
  admin:user:unlock                        Unlock Admin Account

Magento 2 does not support reset password via command line. However, we can create a new admin account, then use the new account to reset the old one.

magento 2 create admin user

Follow this guide to create a new admin account.

Solution 4: Reset Magento 1 via Email

  • Go go Magento admin panel, default is your-domain.com/admin
  • Click Forgot your password?
  • Type your email address which assosiated with admin account in Email Address input box
  • Click Retrieve Password to reset password.
  • Open your email box and check the reset password link. The link is valid in 24 hours. To prevent email to spam box, enable SMTP here.

Increase sales,
not your workload

Simple, powerful tools to grow your business. Easy to use, quick to master and all at an affordable price.

Get Started
avada marketing automation

Comments for Reset Admin Password

Explore Our Products:

People also searched for


Stay in the know

Get special offers on the latest news from Mageplaza.

Earn $10 in reward now!

Earn $10 in reward now!

go up