If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)


Drupal. How to reset admin login details

In this tutorial you will learn the way to change admin password in case you have problems locating it.

1) First of all you should create new file and put the following script in there:

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once 'includes/password.inc';
echo user_hash_password('admin');
menu_execute_active_handler(); ?>

Replace ‘admin’ with the password you need.

2) Save this file as php file on your server, in Drupal root folder, e.g. reset.php

3) Now open this file on your server at http://wwww.yourwebsite.com/reset.php and you should get hash code similar to this one:


4) Copy the code and open your PHPMyAdmin tool, browse “Users” table, then you need to edit ‘admin’ entry:

Paste your new hash code into “pass” field and save the changes:

5) Now open your website and enter new password – it will work properly.

And the most important – you should remember that your website is not secure until you change password in admin panel

Feel free to check the detailed video tutorial below:

Drupal. How to reset admin login details