How to Reset Magento 2 Admin Password
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 experts recommend using strong unique passwords, however, it is the least followed recommendation because unless you know the trick, it is impossible to remember it.
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 😃
You can follow any of the below methods to reset Magento 2 admin password when you forget it!
Methods to Reset Magento 2 Admin Password:
- Reset Magento 2 admin password via command line
- Reset Magento 2 admin password via Email
- Reset Magento 2 admin password from Account Settings
- Reset Magento 2 admin password via phpMyAdmin
No more talking, let me give the solution!
-
Reset Magento 2 admin password via command line
Run the below command:
1php bin/magento admin:user:create --admin-user=admin --admin-password=admin123Enter email,  first name, and last name
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.
-
Reset Magento 2 admin password via Email
- Change Magento 2 admin password using the default recovery system.
- Go to “Admin Panel”
- Click “Forgot Password”
- Enter the Email address and click the “Retrieve password” button.
- 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.
-
Reset Magento 2 admin password from Account Settings:
-
Reset Magento 2 admin password via phpMyAdmin
That was all about changing the Magento 2 admin password.
Both the methods are easy to follow, however, any doubts are welcome in the Comments section below 🙂
Please rate the post with 5 stars if found useful.
Thank you.
Still need help? Hire our Adobe-certified Magento experts.
Sanjay Jethva
Sanjay is the co-founder and CTO of Meetanshi with hands-on expertise with Magento since 2011. He specializes in complex development, integrations, extensions, and customizations. Sanjay is one the top 50 contributor to the Magento community and is recognized by Adobe.
His passion for Magento 2 and Shopify solutions has made him a trusted source for businesses seeking to optimize their online stores. He loves sharing technical solutions related to Magento 2 & Shopify.
4 Comments
We cant go to Magento to change password because our email is fifferent today
iisak
Hey Juha,
For that you need to go to the Database section,
and search for the admin_user table
and then change your email.
If still the error persist do let us know.
I can’t get into Magento because my password isn’t working. The password reset isn’t working either. How do I get in?
I tried the php and that wants a password too which doesn’t work
Hello Kate,
You can follow the below blog:
https://meetanshi.com/blog/solved-magento-2-4-2-admin-login-not-working-on-localhost/
Thank you