How to Log Into Drupal 7 & Retrieve Lost Password
Be sure to replace exampledomain.com with your domain name.
If Drupal was installed on the primary domain and pretty URLs was previously enabled, you also can also use the following URL:
If Drupal was installed in a folder instead, you would need to add the folder's name to the URL, like so:
Once there, enter your username and password.
Request a New Password
If you have forgotten your Drupal password, the easiest way to to regain access is to use the "request new password" feature built into Drupal.
- Click on the Request New Password tab on the login page.
- Enter your e-mail address or Drupal username.
- Click on the E-mail New Password button. The page will refresh and display the following message:
- Check your e-mail for your replacement login information.
- Click on the link in the e-mail. This link can only be used once.
- Once on the page, click on the login button.
- Enter a new password in the fields provided.
- Click the Save button. The page should refresh and display the following message:
You are now logged in to Drupal 7. Be sure to use the password you just set to log in in the future.
Manually Resetting Your Password
Unlike WordPress and some other scripts, you cannot reset the password directly in the database, Instead you have to change the email to one that works, and then reset the password via Drupal's request new password feature.
If you did not get the email or the email you specified for that username is no longer valid, it is possible to manually change the email address in the database so that you may request a new password. You would need access to your cPanel for this.
Step 1: Figuring Out Which Database
Before changing your email address in the database, we will need to locate the Drupal database. If you only have one database, one Drupal installation or you already know the name of the database or think you can figure it out easily, then skip to step 2.
follow these steps to find out the database.
- Log into cPanel.
- In the Files section, click on the File Manager icon to open the file manager in a new window or tab.
- If it asks you for which directory to open, select Web Root (public_html/www) and then press the Go button. This may not appear if you checked skip this question on a previous occasion.
- Locate the Drupal installation in the file system. If you installed Drupal in the main folder of the primary domain, you should already be looking at the Drupal files.
- If you installed it in a subfolder, or an addon domain, you will need to navigate to the appropriate folder. You can use the list of yellow folders on the left, or you can use the list of files & blue folders in the middle/right. (As an example, if you installed Drupal in the "drupal7" folder, you would double click on the blue folder icon next to "drupal7" in the middle/right. That would take you inside the folder and show you Drupal's files.)
- Double click on the blue folder for sites.
- Double click on the blue folder for default.
- Click on the file settings.php so that the background turns blue.
- Click on the Code Editor icon at the top of the page.
- A dialog box will pop up called Code Editor. Click the Edit button.
- Ignore any gray lines beginning with an asterisk (*) as this indicates the line is a comment.
- Scroll down until you find the line that says something similar to:
,where user_drp71 would be whatever your database name is. Write down or remember this database name, as you will need it in the next step.
- You can then close the code editor and close the file manager. No need to save anything since nothing should have been changed here.
Step 2: Fixing the Email Address
To manually change your email address in the database so you can reset your password, please follow these steps:
- Go the cPanel home page (log in if you haven't already).
- In the Databases section, click on the phpMyAdmin icon. This will open phpMyAdmin in another window or tab.
- Find the database in the left column and click on its name.
- Navigate on the right side of the screen to find the users table in the list of tables.
- Immediately to the right the table drupal_users, click on the Browse button.
- Find the username you want to reset in the list of users. If you have a lot of users, expect to navigate multiple pages to find the user you want.
- Click on the Edit icon next to the user you want to reset the password for.
- Locate the mail category in the first column. Next to "mail" you will see the e-mail that is currently set for this user.
- Change the email address to a valid working e-mail address.
- Click the Go button near the bottom of the page.Go
- Follow the directions in the Request a New Password section for requesting a new password.