How to Reset the Admin Password of a Joomla 3 Website

If you cannot log into your Joomla website with the Super User account due to a lost password, don’t be panic because you can still reset the password easily without touching the backend of your site.

You may have noticed that unlike other users, Super Users are not allowed to reset a password by making a request through the “forget your password” link. In below, we will introduce two effective ways for resetting an admin password – by dealing with the database, or by editing the configuration.php file. You can choose either method according to your preference.

Solution 1: Edit the MySQL Database

Assumed that you are using cPanel and phpMyAdmin for the management of MySQL databases, you should first log into cPanel and click on the phpMyAdmin icon in the Databases section.


Once located in phpMyAdmin, click on the Databases button to expand the database list on your account, and then select the database that your Joomla site is using.

Select Database

If you have forgotten the database name, open the configuration.php file in the root folder of Joomla installation and find the following line. Here you can see the database name.

public $db = 'database_name';

In the list of tables, scroll down to find the one with the name ended with “_users”. The table prefix is different depending on how you set it up during the installation. Click on the users table.

Open the Users Table

Now you can see a list of all the users on your Joomla site. Find the user name that you want to reset the password for, and click on the Edit link next to the pencil icon.

Edit User

All the information about the administrator is now presented. To reset the password, you need to find password under Column, select MD5 from the drop-down under Function, and then fill in the new password in the box under Value to replace the old password.

Reset the Admin Password

As soon as you save the changes, you will be able to log into the backend admin area of your Joomla 3 website with the administrator username and the new password.

If this method does not work or you want to try another solution, you can edit the configuration.php file by following the tutorial below.

Solution 2: Edit the configuration.php File

For this solution, you will need to use a tool like an FTP client or the File Manager in cPanel to access and download the configuration.php file. The file is stored in the root directory of your Joomla site.

After the file is downloaded, open it with a text editor, and then add the following line to the bottom of the file. Note that the “username” in the line should be an existing username on your site for which you know the password. Also, this user should already have administrator access which is Author or higher.

public $root_user='username';

Now save the file and upload it back to the server to replace the old one. For security reason, you’d better make a backup of the original file.

As the line added to the file grants temporary Super User access to this user, you can use the username and the corresponding password to log into your admin dashboard, and then change the password of the administrator for which you do not have the password. Or you can also create a new Super User account and delete the old one.

When everything is done, you need to access the configuration.php file again and delete the line you added before to disable the Super User access of the user.

If you have problems in uploading files, try to change the permissions of configuration.php file to 644 before downloading it, and then change them back to 444 after deleting the line of code.