How do I reset the administrator password?

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.

Method 1

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.

  1. Use the cPanel file manager and navigate to /home/yoursite/public_html. If Joomla is installed in a sub-directory navigate to that folder.
  2. 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.
  3. Add this line to the end of the list of lines that start with public

    public $root_user='myname';

    replace myname with your username you want to login with
  4. 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.
  5. 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.
  6. Go back to the cPanel file manager and make sure permissions for configuration.php are set to 444.

Method 2

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.
  1. In phpMyAdmin go to your database for Joomla
  2. 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)
  3. Find the row with the user you want to edit and click the edit button.
  4. Insert the following value in the password field


    The password for that user will now be secret.
  5. Login and make sure to change the password as soon as you can.

Method 3

If you're in a situation where all of your administrator users have been deleted, you can insert a new one directly from phpMyAdmin.
  1. In phpMyAdmin navigate to your Joomla database.
  2. Click the SQL tab and enter the folloowing query

    INTO `jos_users`
       (`name`, `username`, `password`, `params`)
    VALUES ('Administrator2', 'admin2',
        'd2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199', '');
    INSERT INTO `jos_user_usergroup_map` (`user_id`,`group_id`)
  3. You will now be able to login with the username admin2 and the password secret.
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

I am busy running my business, can you maintain my Joomla site for me?

Sure, You can purchase maintenance hours and everytime you ask us to perform a specific task like...

Can you accommodate high traffic Joomla sites?

Yes, our servers are optimized to run Joomla sites with high traffic.

How familiar are you with Joomla?

We are extremely familiar with both Joomla and Mambo. We have been using Mambo since v4.1 (early...

My SEF (Search Engine Friendly URL) option doesn't work?

Did you remember to change the name of the htaccess.txt to .htaccess (or copy the contents)? We...