3 Ways to Reset Magento 2 Admin Password In A Flash

In this post, I will elaborate 3 ways to work around when losing Magento 2 admin password.

Method 1. Web interface

This is the quickest way to reset your Magento 2 admin password.
First, go to your admin login page:

Then, click the Forgot your password ?

Now, you will enter a new page where you can enter the email you want to receive your new Magento Admin password, then click Retrieve Password button:

+) If your email is correct, Magento system will automatically send a confirm email to your email, then you need to click and the link will redirect to the Magento reset password page. The link is valid in 24 hours.

Finally, enter 2 fields are New password and Confim New Password

Method 2: CLI

To get started, login to your server with SSH, then go to the folder root of site.

Next, create a new admin user by using the command below:

php bin/magento admin:user:create --admin-user="demo" --admin-password="demo123" --admin-email="demo@gmail.com" --admin-firstname="Lof of" --admin-lastname="Coder"

+) Login to admin panel using the new account, then change the password of account that you lost

Also, check more detail at http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-admin.html

Method 3: phpMyadmin

We can reset your Magento 2 admin password directly through the database of your website application. So, changing Magento 2 admin password using database is very easy. All you need to do is to log in to the phpMyadmin cpanel and select the database of your site. Then, check the database name using for your site in file <folder_root>/app/etc/env.php and find the field ‘dbname’ => ‘CURRENT_DATABASE’,

Now, run the query below to set new password for account that you lost:


UPDATE `admin_user` SET `password` = MD5('NEWPASSWORD') WHERE `username` = 'ADMINUSERNAME';

Admin_user: this is database table from the Magento database.
NEWPASSWORD: the new password which you want to be set.
ADMINUSERNAME: your Magento admin username

Execute the query and your new password will be set.

Hope that the tutorials will support you well in retrieving Magento 2 Admin Password. If you have any feedback, please leave it in the comment section down below.

Related Tutorials

Admin Admin

Recent Posts

15+ Must-have Magento 2 Free Extensions To Supercharge Your Store In 2025 | Latest updates

Magento 2 is an incredibly flexible and powerful eCommerce platform that can be tailored to…

6 days ago

Black Friday 2024: Hot Deals Collection For Magento 2

Black Friday and Cyber Monday – BFCM 2024 are nearly around the corner, and it’s…

1 week ago

What To Consider While Using Magento 2.0 For Your Streaming App?

When it comes to e-Commerce platforms, undoubtedly Magento 2.0 grabs the spotlight. Magento might not…

1 week ago

Landofcoder BFCM 2024: Biggest Sale Of The Year – 30% OFF All Magento 2 Extensions

The holiday shopping season is here, and there’s no better time to supercharge your Magento…

1 week ago

Top 10 Progressive Web App Development Companies To Elevate Your Business

In today’s digital landscape, the rapid evolution of advanced web applications, particularly Progressive Web Apps…

2 weeks ago

Why Your Retail Business Needs Big Data eCommerce In 2025?

As eCommerce booms, big data eCommerce will be all about providing insight into how to…

2 weeks ago