Normally you would use the user manager
to add or change users. Sometimes though you may have forgotten your password or have been hacked and the password got changed on you. If that's the case here are three ways to get your access back.
This method will get you access to the administrator without the use of a password. It does require you know a username of a user that is designated as an Author or higher to get in to the administrator.
- Use the cPanel file manager and navigate to /home/yoursite/public_html. If Joomla is installed in a sub-directory navigate to that folder.
- Edit the configuration.php file. It will likely be at 444 permissions, so you will need to change them to 644 before you'll be able to save changes.
- Add this line to the end of the list of lines that start with public
replace myname with your username you want to login with
- Now when you go to the administrator you'll be able to login with that user without using a password. You can use the user manager to change the password or create a new user.
- When you're done you will see a link that says "Click here to try to do it automatically". Click that to automatically remove the line you added to configuration.php.
- Go back to the cPanel file manager and make sure permissions for configuration.php are set to 444.
If you don't know any of the administrator usernames on your site then you can use this method to find usernames and change the password using phpMyAdmin
- In phpMyAdmin go to your database for Joomla
- Browse the table for jos_users (or replace jos_ with the database prefix you're using. If you're unsure you can find it in the configuration.php file)
- Find the row with the user you want to edit and click the edit button.
- Insert the following value in the password field
The password for that user will now be secret.
- Login and make sure to change the password as soon as you can.
If you're in a situation where all of your administrator users have been deleted, you can insert a new one directly from phpMyAdmin.
- In phpMyAdmin navigate to your Joomla database.
- Click the SQL tab and enter the folloowing query
INSERT INTO `jos_users`
(`name`, `username`, `password`, `params`)
VALUES ('Administrator2', 'admin2',
INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`)
- You will now be able to login with the username admin2 and the password secret.