We will create a PHP script to reset our admin password in Joomla.
Using a text editor enter the code exactly as illustrated here
The value entered for the variable $password (password1234) will be the new password for your admin user account
1) 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 from your browser
2) Now log in to your admin panel using the password you entered in the previously written script
3) Enter your User Name
4) Next enter the password from your script
5) Now click the Log in button
6) After logging in, select the User Manager icon.
7) Click the name of the account you just reset the password for
8) Here you can change the password and Save the record to update linked tables properly
9) Reenter your password in the Confirm Password field
10) Click the Save & Close button
You now know how to reset your Joomla admin password using a custom PHP script