How To Reset Password In Joomla

joomla password reset

There are 4 methods to gain admin access to Joomla or reset your Super Admin User Password or any user password:

  • Method 1: Reset Password in Joomla Administrator Backend
  • Method 2: Reset Super Administrator Password with DataBase
  • Method 3: Add a New Admin Super User with Database Assistance
  • Method 4: Give Super Admin Rights to any Current User

1. Reset Password in Joomla Administrator Backend

If you have access to the Joomla administrator backend, you can reset a user's password. Go to "Users" > "User Manager" in the backend menu.

joomla password backend users joomla password backend users

Locate the user whose password you want to reset and click on their username.

joomla password backend users name joomla password backend users name

In the user's profile, find the "Password" field. Save the changes, and inform the user of their new password.

joomla password backend details joomla password backend details

2. Reset Super Administrator Password with DataBase

If you've forgotten the password for the Super Administrator account (typically the initial admin account created during Joomla installation), you'll need to directly modify the database. Access your Joomla site's database using phpMyAdmin or a similar tool provided by your web host.

joomla password phpmyadmin base joomla password phpmyadmin base

Locate the USERS table, which may have any prefix, and click on the "Browse" button next to edit it.

joomla database users table joomla database users table

Find the Super Administrator user and click on the "Edit" button next to it.

joomla database admin change password joomla database admin change password

In the "password" field, delete the existing encrypted password and enter the new password directly. It's crucial to use the correct encryption for the new password. Please use the following password:

d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199

and press Go. Now, the password for this user is:

secret

Please use this password to log in to the admin area and replace the user's password as described in method 1.

joomla database admin change set new password joomla database admin change set new password

3. Add a New Admin Super User with help Database

You may use this SQL code for Joomla 2.5, 3.x, 4.x, 5.x.

If the changed password does not work, or you have lost admin user access due to hacking, and if you have database access to your site, you may add a new Super Admin User.

Access your Joomla site's database using phpMyAdmin or a similar tool provided by your web host. For example, in cPanel:

cpanel phpmyadmin cpanel phpmyadmin

In phpMyAdmin, select the database with your Joomla website on the left sidebar. There, you will see all tables for this database. In the central part, select the SQL tab to run an SQL query on this database. There, you will see a field called "Run SQL query/queries on database - your database -".

phpmyadmin select databsase and mysql command phpmyadmin select databsase and mysql command

Copy and paste the following query below and press the Go button to add the new Admin to the Joomla website.

INSERT INTO `jos_users` 
(`name`, `username`, `password`, `params`, `registerDate`,
`lastvisitDate`, `lastResetTime`)
VALUES ('Administrator2', 'admin2', 'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199',
'', NOW(), NOW(), NOW());
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`)
VALUES (LAST_INSERT_ID(),'8');
insert new joomla admin user mysql command insert new joomla admin user mysql command

Please do not forget to set the correct table prefix like in other tables in this database! Just like this: JOS_

As a result, you will create a new Super Administrator with the username: admin2 and with the password: secret.

Afterward, please log in with the new user to your administrator part and use method 1 to recover your main user or change data for this new user.

4. Give supper admin rights to any current user

If you don't have access to the Joomla backend and the database, and you know someone's login/password on your site, you can set this user as a Super Admin by directly modifying the configuration file.

Access your Joomla site's files using an FTP client or file manager provided by your web host.

cpanel file manager cpanel file manager

Locate the configuration.php file in the Joomla website root directory of your Joomla installation. If this file has a permission value of 444, please change it to 644. Download the file to your local computer and open it using a text editor. Add this line:

public $root_user='myname';

where: "myname" is the username of the user who will have the Super Admin rights. Save the changes and upload the modified configuration.php file back to your Joomla site's root directory.

After logging in to the website, use method 1 to create a new password for the "Super Admin" user. Then, please remove the row with root_user from configuration.php

Other Tutorials for Joomla: