Admin password recovery guide

At one time or another almost everyone has forgotten a password. Fortunately, there are a few easy ways to recover a password.

If you are a WordPress user and you know a username or email address connected to the website you can recover the password through the automatic emailer. But what to do if it is not the case?

Here are a few scenarios and tips, which I hope you’ll find helpful.

You don’t have the admin password but you have a password to your database


If you have phpMyAdmin access to your database on your website’s hosting administration panel (directadmin,cpanel etc.), login to it and find your website database there. Click on it, and all the tables in your database should appear.

For WordPress users: find wp_users, locate your username under user_login and click edit. Your user_id should show, you need to edit it. You should see a long list of letters and numbers next to user_pass, delete them all and type in your new password. Next step is selecting MD5 from the dropdown menu and clicking “Go” button on the bottom. And it’s done.

For Joomla! users (for Joomla! 2.5 and higher): find and click on the table with "_users" appended in the list of tables. Click on the "Browse" button in the top toolbar. This will show all of the users that are set up for this site, you just need to find the user whose password you want to change. Now, paste “d2064d358136996bd22421584a7cb33e:trd7TvKHx6dMeoMmBVxYmg0vuXEA4199” into the password field and press “Go”. phpMyAdmin should display the message "Affected rows: 1". At this point, the password should be changed to"secret". Log in with this user and password and change the password of this user to a secure value.

You don’t have either the admin or the database password but you have an access to FTP

Very easy way to reset your password is using FTP. Here’ how you should proceed:

For WordPress users: Login to your site via FTP and download your active theme's functions.php file. Then edit the file and add this code to it, right at the beginning, after the first

wp_set_password( 'password', 1 );

While you are there put in your own new password and upload the modified file back to your site. Make sure to go back and remove that code after you logged in successfully to your website.

For Joomla users: Login to your website via FTP. If the permissions are 444 or some other value, then change the permissions of the configuration.php file to 644. Then, download the configuration file and open it. To the bottom of the list where myname is a username with administrator access that you know the password for add this line:

public $root_user='myname';

Now, save this file and upload it to the site. Then, login to your website and change the password.

If you do not know the super user credentials, then in the same configuration.php file you can grab the access to your database from the following variables (values between apostrophes):

public $host = 'database_host';

public $user = 'database_user';

public $password = 'database_password';

public $db = 'database_joomla';

Use the steps from the previous section to change your password with these data.

You don’t have the admin, the database or the FTP password

Don’t worry. There is always a solution. This one costs some effort and the hosting company support workers’ goodwill but this is your last resort.

Try to contact your hosting company and ask them to reset your password. Remember, every hosting company has its own policy in such issues. You need to be prepared to provide them many details as for example bank account number from which you make payments or even the last invoice.

Don’t make mistakes twice. Use password managers

Yes. You need a password manager. Why it is worth to use it? It is the easiest and the safest way to store all of your passwords. Moreover, this software can generate unique and strong passwords too.

How it works? It encrypts all the information and uses a single strong master password that you enter when you want to access your other passwords. You don’t need to worry about remembering more than one password anymore!

Here are some good free ones: LastPass, Dashline, KeyPassX, StickyPassword.