How to reset the admin password in Drupal

Resetting the Admin Password in Drupal

 

If you have been locked out of your Drupal admin account, you can reset the password through phpMyAdmin or Drush.

 

Method 1: phpMyAdmin

  1. Log into cPanel > phpMyAdmin
  2. Select your Drupal database from the left sidebar
  3. Click on the users_field_data table (Drupal 8/9/10) or users table (Drupal 7)
  4. Find the admin account (usually uid = 1)
  5. Click Edit
  6. In the pass field, you cannot simply type a new password because Drupal uses hashed passwords

 

Method 2: Drush (Recommended)

If you have SSH access and Drush installed, the easiest method is:

cd /home/username/public_html
drush user:password admin "newpassword"

 

Method 3: Password Reset Link

Via Drush:

drush user:login

This generates a one-time login link you can use in your browser to access the admin and set a new password.

 

If you do not have SSH access, contact support and we can assist with the password reset.

  • 155 Users Found This Useful

Was this answer helpful?

Related Articles

How do I reset Zen Cart administrator password?

First login to your control panel with us, then click on the "phpMyAdmin" icon. Click the...

Best WP Plugins

The best wp plugins we believe at this time are W3Total Cache, WordFence, Yoast SEO and iThemes...

Tiki Wiki: Notice: Only variable references should be returned by reference

You can find the latest version of ADODB here. To modify the function to not return a...

How do I reset Joomla administrator password?

How to reset Joomla administrative password Start by logging into your control panel. Once...

Joomla Strict Standards: Declaration of JParameter::loadSetupFile() should be compatible with that of JRegistry::loadSetupFile()

Joomla: Strict Standards Declaration of JParameter Error   The error "Strict Standards:...



Save 30% on web hosting - Use coupon code Hosting30