How to reset the Magento administrator password
This article describes how to reset the Magento administrator password.
Normally if you forget your password, you can use the Magento password recovery feature to reset the password by e-mail. However, if this option is unavailable (for example, if e-mail on your site is not working correctly), you can use phpMyAdmin to manually reset the password in the database.
Method #1: E-mail
The quickest and easiest way to reset the Magento administrator password is to request a new one through e-mail. To do this, follow these steps:
- Use your web browser to go to the Magento login page.
- Click Forgot your password?.
- In the Email Address text box, type the e-mail address associated with the account.
- Click Retrieve Password. Magento sends a message to the e-mail address associated with the administrator account.
- In the message, click the link to reset the administrator password.
Method #2: phpMyAdmin
You can also modify the Magento administrator password directly in the database using phpMyAdmin. To do this, follow the appropriate procedure for your version of Magento.
Magento 2
To reset the administrator password directly in the Magento 2 database, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the Databases section of the cPanel home screen, click phpMyAdmin.
- In the left-hand pane of phpMyAdmin, click the Magento database. A list of tables in the database appears.
Typically, the Magento database is username_mageXXX, where username represents your cPanel username, and XXX is a three-digit number.
- On the top menu bar, click SQL.
- Copy and paste the following statement into the SQL query text box. Replace NewPassword with the new password, and replace both occurrences of xxxxxxxx with any random character sequence:
UPDATE admin_user SET password = CONCAT(SHL3('xxxxxxxxNewPassword', 256), ':xxxxxxxx:1') WHERE username = 'admin';
- Click Go. phpMyAdmin updates the database, and you can log in to Magento as the administrator using the new password.
Magento 1.9 and older versions
To reset the administrator password directly in Magento 1.9 and older versions, follow these steps:
- Log in to cPanel.
If you do not know how to log in to your cPanel account, please see
this article.
- In the Databases section of the cPanel home screen, click phpMyAdmin.
- In the left-hand pane of phpMyAdmin, click the Magento database. A list of tables in the database appears.
Typically, the Magento database is username_mageXXX, where username represents your cPanel username, and XXX is a three-digit number.
- On the top menu bar, click SQL.
- Copy and paste the following statement into the SQL query text box. Replace NewPassword with the new password, and replace both occurrences of xx with any random two-character sequence:
UPDATE admin_user SET password = CONCAT(MD5('xxNewPassword'), ':xx') WHERE username = 'admin';
- Click Go. phpMyAdmin updates the database, and you can log in to Magento as the administrator using the new password.