How to Reset Joomla Admin Password?

In ordinary way you can reset Joomla admin password from the admin panel through the User Manager. To do this, you have to be logged in as a Super Administrator.


What if it is impossible to reset Joomla admin passwords in such a way? For example, your website have been hacked, the previous admin person is no longer available or you just have forgotten the password. What you have to do?


Joomla is not simple thing. Joomla has some possibilities to reset admin password in other way. We will show you two methods, follow our instructions and get knowledge in how to reset Joomla admin password:


Method 1: Through Configuration.php.

If you have access to your configuration.php, consider yourself lucky because you can reset your Joomla admin password, just follow steps bellow.

Step 1:

Connect to your website through FTP and find configuration.php file. Check the permissions and if it is 444, change them to 644. This will prevent errors with saving in future.

Step 2:

To reset your Joomla admin password you will need to download the configuration.php file.

Step 3:

Using text editor (ex. Notepad++) open the configuration.php and add this text at the bottom of the list:

public $root_user='myname';

'myname' - is a username of exested user that have access level Author or higher.

Step 4:

Save the configuration.php file and upload it back to the website. You can leave the permissions at 644.

Step 5:

Now the user have Super Admin access. Log into the admin area of the website and change the password of user that you don't have the password or create a new user and make it Super Administrator.

Step 6:

Go back to configuration.php file and delete the row that was added before. Follow the method Step 2 - Step4

Step 7:

After you made all corrections to finish the process of resetting Joomla admin password, change the permissions for configuration.php file to 444 and save.

Now you know how to reset admin password in Joomla, but we have the second method.


Method 2: Direct Database Editing.

If above methods are not working we can propose you two additional, but both of them require working with MySQL database.

Reseting admin password in the database.

This method of resetting Joomla admin password requires access to the MySQL database. You can enter database through phpMyAdmin or another client.


NOTE! Change your password after you will get the access to the website. We show how to change password to the word "secret"

Step 1:

After logging into MySQL navigate phpMyAdmin and select the database for your Joomla! Website.

How to reset admin password in Joomla? Log into MySQL.

Step 2:

Find and click on the table with "_users" appended in the list of tables (note: you may have a prefix that is not jos_, simply go to the _users table for your prefix).

How to reset admin password in Joomla. Table _users

Step 3:

Find the user that you don't know the password and press Edit button.

How to reset admin password in Joomla. Edit Password

Step 4:

A form will display that you can edit the password field. Copy the value d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199 into the password field and press Go. After that phpMyAdmin should display the message Affected rows: 1. At this point Joomla admon password should be changed to secret.

How to reset admin password in Joomla. Insert Password

Step 5:

Log into the admin panel with above user and password and change the password to secure. Also, if your website have been hacked, check all users on admin access.

How to reset admin password in Joomla. Change Password

Add a New Super Administrator User.

Changing the password is not working? You aren't sure which user is in the Super Admin Group? Use bellow method to reset Joomla admin password!

Step 1:

After logging into MySQL navigate phpMyAdmin and select the database for your Joomla! Website.

How to reset admin password in Joomla? Log into MySQL.

Step 2:

Find and press the SQL button to start SQL query running. This action will display a Run SQL query/queries on database <your database>

How to reset admin password in Joomla? Press SQL button.

Step 3:

Delete all text is this field then copy and paste the following query bellow and press the Go button to execute the query and add the new Administrator user to the table.

How to reset admin password in Joomla? Paste following code

Make sure you've filled in correct db table prefix!

The following code uses jos31_ as the table name prefix which is only an example table prefix. The prefix when you first installed Joomla is RANDOM or what you set it specifically too. You will need to change all occurrences of jos31_(your install set prefix) found in the code below to the prefix your installation is using.

SQL code for use with Joomla 2.5.x  3.1.x 

INSERT INTO `jos31_users`
   (`name`, `username`, `password`, `params`)
VALUES ('Administrator2', 'admin2',
    'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
INSERT INTO `jos31_user_usergroup_map` (`user_id`,`group_id`)
VALUES (LAST_INSERT_ID(),'8');

Step 4:

After you have done all this, you will be able to log into the admin panel of your Joomla website with admin2 username and password secret. After you logging in, go to the user manager to new and add valid e-mail to account. If you think you have been hacked, check that all users are legitimate, especially user that are in the Admin group

Warning: The passwords that we are using in this article are public known, so we recommend to use them only for recovering. Your website can be hacked if you don't change the password to secure value.

The examples above change the password to "secret". Two other possible values are shown below:

  • password = "this is the MD5 and salted hashed password"


  • admin = 433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT
  • secret = d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199
  • OU812 = 5e3128b27a2c1f8eb53689f511c4ca9e:J584KAEv9d8VKwRGhb8ve7GdKoG7isMm

Find more interesting articles in Joomla tutorials section.