{"id":20298,"date":"2012-07-10T09:50:20","date_gmt":"2012-07-10T13:50:20","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=20298"},"modified":"2016-02-24T03:29:06","modified_gmt":"2016-02-24T08:29:06","slug":"drupal-how-to-reset-admin-login-details","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/drupal-how-to-reset-admin-login-details.html","title":{"rendered":"Drupal. How to reset admin login details"},"content":{"rendered":"<p>\r\n<\/p>\r\n<p>In this tutorial you will learn the way to change admin password in case you have problems locating it.<\/p>\r\n<p><strong>1)<\/strong> First of all you should create new file and put the following script in there:<\/p>\r\n<pre class=\"brush:php\">\r\n\r\n&lt;?php\r\ndefine('DRUPAL_ROOT', getcwd());\r\nrequire_once DRUPAL_ROOT . '\/includes\/bootstrap.inc';\r\ndrupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);\r\n \r\nrequire_once 'includes\/password.inc';\r\necho user_hash_password('admin');\r\n \r\ndie();\r\nmenu_execute_active_handler(); ?&gt;\r\n\r\n<\/pre>\r\n<p>Replace &#8216;admin&#8217; with the password you need.<\/p>\r\n<p><strong>2)<\/strong> Save this file as php file on your server, in Drupal root folder, e.g. reset.php<\/p>\r\n<p><strong>3)<\/strong> Now open this file on your server at <strong>http:\/\/wwww.yourwebsite.com\/reset.php<\/strong> and you should get hash code similar to this one:<\/p>\r\n<p>$S$DMNPfKMxzmGB6wQZtxuVDF3uSqZef8aBRrUJLKfJHdXwfaUjh3zB<\/p>\r\n<p><strong>4)<\/strong> Copy the code and open your PHPMyAdmin tool, browse <strong>&#8220;Users&#8221;<\/strong> table, then you need to edit <strong>&#8216;admin&#8217;<\/strong> entry:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details1-300x224.jpg\" alt=\"\" width=\"300\" height=\"224\" class=\"alignnone size-medium wp-image-20299\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details1-300x224.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details1.jpg 695w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p>Paste your new hash code into &#8220;pass&#8221; field and save the changes:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details2-300x77.jpg\" alt=\"\" width=\"300\" height=\"77\" class=\"alignnone size-medium wp-image-20300\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details2-300x77.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2012\/06\/Drupal_how_to_reset_admin_details2.jpg 713w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<p><strong>5)<\/strong> Now open your website and enter new password &#8211; it will work properly.<\/p>\r\n<p class=\"attention\">And the most important &#8211; you should remember that your website is not secure until you change password in admin panel<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"\/help\/files\/Drupal\/Drupal_how_to_reset_admin_details.htm\" target=\"blank\">Drupal. How to reset admin login details<\/a><\/p>\r\n<\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>In this tutorial you will learn the way to change admin password in case you have problems locating it.<\/p>\n","protected":false},"author":29,"featured_media":20304,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[723],"tags":[666,593,808,809],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/20298"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=20298"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/20298\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/20304"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=20298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=20298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=20298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}