[contact-form-7 id="24078" title="Feedback EN"]

Featured templates

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