- Log into Mysql or login using PhpMyadmin and go to your respective database
- Find the
users_field_datatable - Find the user that is related to you.
- Log into your terminal
- Go to your Drupal projct main directory
- Run this command
php core/scripts/password-hash.sh “NewPasswordHere”
It will create a hash of password and it can use in database.
- Go back to your DB table
- Replace the pass value with your new hash. Save/update your table’s row.
- Go to
floodtable in DB (if you are running a non-production server, simply truncate this table, otherwise look for anything that is flagging your IP with logging in. delete those records.) - Go to
cache_entitytable in DB (if you are running a non-production server, simply truncate this table, otherwise look for anything that is flagging your IP with logging in. delete those records or clear cache by drush using thedrush crcommands.) - Now you should be ready to log in with the new password. Go your login page on your site and try again!
Or follow the link to reset password via drush: https://www.siteground.com/kb/reset_drupal_admin_password/