Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Reset Your Magento Admin Password

Locked out of your Magento store admin? This guide shows how to set a new password.

CMS and Apps2 min read15 steps

What is Magento?

Magento is an online shop platform. You manage your products and orders from its admin panel. If you lose the password, you can reset it by email, from the command line, or in the database.

  1. Go to your admin address. It is often yourdomain.com/admin, but it can be custom.
  2. Click Forgot your password?
  3. Type your admin email and click Retrieve Password.
  4. Open the email and click the link.
  5. Type a new password twice and save.

If no email comes, check spam. Your store must be able to send email.

Method 2: Use the command line

The command line is a text window where you type commands. You need SSH access. SSH is a safe way to connect to your server. Ask Hostvento support if your plan has it. This is for Magento 2.

  1. Connect to your server by SSH.
  2. Go to your Magento folder with cd.
  3. Run this command, with your own username and password:
php bin/magento admin:user:create --admin-user="newadmin" --admin-password="Choose-A-Strong-Pass-1" --admin-email="you@example.com" --admin-firstname="Your" --admin-lastname="Name"

This creates a new admin user. Log in with it and then change the old user's password inside the panel.

Method 3: Edit the database

Warning: You are changing the database. Take a backup first.

  1. Log in to cPanel and open phpMyAdmin.
  2. Click your Magento database.
  3. Open the table admin_user.
  4. Click Edit on your admin row.
  5. In the password field, paste a new hashed password. A hash is a scrambled form. Magento 2 uses a salted hash, which is hard to build by hand, so the command in Method 2 is better.

On Magento 1 the old trick was to use an MD5 value with a salt. Magento 1 is very old and no longer supported. Move to Magento 2 if you can.

After you log in

  1. Click your name, then Account Setting.
  2. Set a new strong password.
Tip: Use a password manager to keep strong passwords safe.

Quick recap

  • Try the Forgot your password? link first.
  • Use bin/magento admin:user:create if you have SSH.
  • Edit the database only as a last choice, and back up first.
  • Change to a strong password after login.