How to Reset Magento 2 Admin Password?

Forgot your Magento 2 admin password? Don't worry. Today we will see how to reset Magento 2 admin password in this article.

Security is always an important factor of any platform or for any organization. The most important is the administrator's password, right? If you're a Magento admin then you know how important a password is. Creating a strong password is essential to avoid unauthorized login or fraud by accessing an admin panel.

Being a Magento user, you know that a Username and Password are required fields to enter into the Magento admin system. Forgetting the admin password can put you in big trouble. Security experts suggest that changing your password frequently may help you protect your system.

However, remembering a password can be difficult. So in case, you forgot your Magento 2 admin password, we are here to help you.

How to Reset Magento 2 Admin Password

There are 4 types of ways that you can use for Magento 2 reset admin password or whenever the Magento 2 admin login not working.

Reset Magento 2 admin password via command line

Open a command prompt and run the following command.

php bin/magento admin:user:create --admin-user=Admin_admin --admin-password=admin1234

Then, enter your email address, first name, and last name.

However, Magento 2 doesn't support the command line to reset the admin password. But you can create a new admin account through this command and use it to reset your admin password in Magento 2.

Reset Magento 2 admin password in phpmyadmin

To reset Magento 2 admin password with phpmyadmin, you can run an SQL query. Follow the steps.

1. Go to phpmyadmin.

2. Then, go to the database and search for a admin_user table.

3. Now, copy the following SQL Query in the SQL section.

UPDATE admin_user SET password = SHA2('YourNewPassword', 256) WHERE username='admin';

4. Lastly, run the query.

Reset Magento 2 admin password from Account Settings

Another simple way to reset the admin password Magento 2 is from Account settings. For that follow the steps given here.

1. Log in to your admin panel.

2. Go to Account Settings. Check the screenshot for a better understanding.

admin password

3. Now, another window will open where you can see all the admin information.

4. Here, you need to enter your New Password.

5. Again, enter the changed password in the Password Confirmation field as shown in the below screenshot.

Reset Magento 2 admin password

6. Then, enter your old password in the Your Password field for identity.

7. Click on the Save Account button to save all the details.

You can use this method only when you remember your old Magento 2 admin login password.

Reset your Magento 2 password via Admin panel or Email

When you are stuck on the sign-in page at the time of admin login and you don't remember the password, then hit the Forgot Your Password? button.

This is the easiest way to reset the admin password in Magento 2.

After that enter the email address to which your admin account is linked. Check the screenshot for the same.

Magento 2 admin password reset

 

Then, complete the human identity and hit on the Retrieve Password button.

You will receive an email of resetting your password. To avoid email spam, enable SMTP here.

 

Now, you can easily set the new password with the reset password link you have received in your email.

Bottom Line

Hope that our article on how to reset Magento 2 admin password will help you to reset your Magento 2 admin password. All the methods are very useful. You can use any of the methods that you find suitable for you. If you come across any errors or have any doubts then, the comment section is all yours, or contact us directly.

If you find this helpful then share it with Magento community friends.

Happy to help you always.

Stay tuned :)