4 Ways to Reset Admin password in Magento 2
With a big catalog of 234+ extensions for your online store
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. Or in other cases, you need to change your password regularly for better protection. 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 4 ways to reset the admin password in Magento 2:
- Solution 1: Reset Magento 2 admin password in phpmyadmin
- Solution 2: Reset your Magento 2 password from Admin panel
- Solution 3: Reset Magento 2 admin password via command line
- Solution 4: Reset Admin password in Magento 2 via Account Settings
Solution 1: Reset Magento 2 admin password in phpmyadmin
In this solution, we are going to use phpmyadmin to change the admin password. 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
<?php
return array (
...
'crypt' =>
array (
'key' => '525701df74e6cba74d5e9a1bb3d935ad', //cryptographic salt
),
...
Solution 2: Reset your Magento 2 password from Admin panel
One of the most straightforward and easiest to do is resetting the password for your Magento 2 store right from the Admin panel.
- If you forget your password, click hte
Forgot Your Password?
link.
- 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)
Another method is using the command line. We typed on Magento 2 root folder:
php bin/magento -h
It show the admin command line:
...
admin
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.
Follow this guide to create a new admin account.
Solution 4: Reset Admin password in Magento 2 via Account Settings
This tactic can be used when you remember your current password but want to reset it for security.
- Go to Magento Admin panel
- Click on the Account Settings in the drop-down list of the account
- Type the new password
- Confirm the new password by retyping
- Enter the old password for identity check
- Select Save Account
The bottom line
Resetting your admin password in Magento 2 is easier than ever if you follow the above 4 solutions. Feel free to choose the way that suits you, and you are welcomed to comment your ideas or any concerns you are having in the comment box. And don’t forget to check the related topic below!
Related Topics:
Looking for
Customization & Development Services?
8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.
Get free consultantRecent Tutorials
Change Store Email Addresses
Fix Magento 2 'Invalid Form Key. Please refresh the page'
Magento 2 Search Settings: Default Magento vs Mageplaza AJAX Search
Explore Our Products:
People also searched for
- magento 2 change password in database
- magento 2 change admin password in database
- magento 2 reset admin password cli
- magento 2 reset admin password command line
- magento 2 change admin password cli
- change password magento 2 phpmyadmin
- magento 2 update admin password mysql
- magento 2 change admin password command line
- magento 2 reset admin password database
- magento 2 change user password in database
- magento 2 update admin password
- magento reset admin password command line
- magento 2 password reset
- reset password magento 2
- magento2 reset admin password phpmyadmin
- change magento 2 admin password
- how to reset magento 2 admin password
- magento 2 admin password
- magento 2 change admin password in backend
- magento 2 change admin user password
- update admin password magento2
- magento 2 update admin password from database
- magento 2 default admin password
- magento 2 change password
- magento reset admin password
- magento reset admin password phpmyadmin
- magento change admin password
- magento 2 forgot admin password
- we're unable to send the password reset email. magento 2
- reset magento 2 admin password in phpmyadmin
- magento reset admin password cli
- magento reset password
- magento 2 reset password not working
- magento 2 change admin password from database
- magento default admin password
- magento 2 change customer password in database
- magento admin password reset
- magento 2 change admin password database
- magento password
- magento 2 password hash
- reset magento admin password
- magento password reset
- magento admin default password
- magento 1 reset admin password
- magento change password in database
- reset magento password
- 2.2.x, 2.3.x, 2.4.x
Stay in the know
Get special offers on the latest news from Mageplaza.
Earn $10 in reward now!