Knowledge Base
How To Reset Drupal Admin Logins via SSH
The steps below only apply to Drupal websites installed in Virtual Private Servers (VPS) and dedicated hosting servers.
Drupal 9
Follow the steps below if you have Drupal website version 9 or later.
- Connect to SSH on your Windows computer or on your Mac computer.
- Access the file directory of the website by entering the command below. Replace public_html with the correct file directory of your website if it is not in the public_html folder.
cd ~/public_html
- Press Enter key on your computer.
- Enter the command below. Replace the newpassword with your new password for Drupal login and replace admin with its username.
drush upwd admin "newpassword"
- Press Enter key on your computer.
Drupal 8
Follow the steps below if you have Drupal website version 8.
- Connect to SSH on your Windows computer or on your Mac computer.
- Access the file directory of the website by entering the command below. Replace public_html with the correct file directory of your website if it is not in the public_html folder.
cd ~/public_html
- Press Enter key on your computer.
- Enter the command below. Replace the newpassword with your new password for Drupal login and replace admin with its username.
drush upwd admin --password=”newpassword”
- Press Enter key on your computer.
If your Drupal website version is not mentioned above try other ways to reset your Drupal admin logins.
Try accessing your Drupal admin page with the new logins via the link yourdomain.com/user/login (replace yourdomain.com with the domain of your website) or via Softaculous Apps Installer in cPanel.
Do not hesitate to contact our Singapore or Australia Support Team if you have further questions.
* Your feedback is too short