How to reset your Joomla admin password using a custom PHP script – joomla 2.5 tutorials

We will create a PHP script to reset our admin password in Joomla.

Using a text editor enter the code exactly as illustrated here. Now select the Save menu option.

Give the file a name like ‘resetadmin.php’ and then upload it to your Joomla web site root or home directory.

Run the script by entering http://vvww.joomquery.com/resetadmin.php from your browser.

Now log in to your admin panel using the password you entered in the previously written script.

After logging in, select the User Manager icon.. Click the name of the account you just reset the password for. Here you can change the password and Save the record to update linked tables properly.

 

 

 

<?php

$username = "admin";

$password ="password12345";

require "configuration.php";

$conf = new JConfig();

$dblink = mysql_connect($conf->host, $conf->user, $conf->password);

mysql_query("USE $conf->db");

mysql_query("UPDATE ($conf->dbprefix)users SET password = MD5("$password") WHERE username = '$username'");

mysql_close($dblink);

?>

CLICK TO SEE VIDEO FOR MORE DETAILS

{youtube}LepQ2w6BZsI{/youtube}

 

Reenter your password in the Confirm Password field. Click the Save & Close button. You now know how to reset your Joomla admin password using a custom PHP script.

Leave a comment