Reset password using drush

This commands will be help you to reset the admin password of your site.

# Provide you a login link
drush uli
# Set the password for any user
drush upwd admin –password=”new password”

One more way :

cd php scripts/password-hash.sh 'drupal'

This will generate a hash for you, copy and paste in below queries.

drush sql-cli
update users set name='admin', pass='Hash generated from above command' where uid=1;
quit

Advertisements