I seem to have blew up the admin user account, password recovery is not working because the server cant send emails. how do I change the password for the admin console? from CLI since I cant get into the web :)

  • Do you have FTP access
    – inrsaurabh
    May 1, 2017 at 16:23

3 Answers 3


try this command

php bin/magento  admin:user:create --admin-user="test" --admin-password="L3tsPlay$!" --admin-email="[email protected]"  --admin-firstname="Testing" --admin-lastname="Admin"

this will create an admin test user, go in to the admin console with it then you can then reset the password for admin or have a backup admin user called test in case you do this in the future again. good luck, we've all done it in the past :)


You can add an admin user using the CLI with the following command:

php bin/magento admin:user:create --admin-user 'adminUserName' --admin-password 'password' --admin-email '[email protected]' --admin-firstname 'admin-fn' --admin-lastname 'admin-lastname'

It doesn't seem like there's a bin/magento command for resetting an admin password.

Your best chance is to create a new Admin user from the CLI and then use that user to reset the first user's password.

Something like the following should do the trick:

php bin/magento admin:user:create --admin-user="admin" --admin-password="password1" --admin-email="[email protected]" --admin-firstname="Admin" --admin-lastname="Admin"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.