in Web and Tech, Work

Resetting a lost WordPress password

Extracted from WordPress Codex:
http://codex.wordpress.org/Resetting_Your_Password

 

Through phpMyAdmin

This article is for those who have phpMyAdmin access to their database. Note: use phpMyAdmin at your own risk. If you doubt your ability to use it, seek further advice. WordPress is not responsible for loss of data.

Begin by logging into phpMyAdmin and click databases.

Image #2
A list of databases will appear. Click your WordPress database.

Image #3
All the tables in your database will appear. If not, click Structure.
Look for wp_users.
Click on the icon for browse.
Locate your Username under user_login
Click edit (may look like a pencil icon in some versions of phpMyAdmin)

Image #4
Your user_id will be shown, click on Edit
Next to the user_pass is a long list of numbers and letters.
Select and delete these and type in your new password.
Type in the password you want to use. Just type it in normally, but remember, it is case-sensitive.
In this example, the new password will be ‘rabbitseatcarrots’
Once you have done that, click the dropdown menu indicated, and select MD5 from the menu.

Image #5
Check that your password is actually correct, and that MD5 is in the box.
Click the ‘Go’ button to the bottom right.
Test the new password on the login screen. If it doesn’t work, check that you’ve followed these instructions exactly.

 

Through FTP

There is also an easy way to reset your password via FTP, if you’re using the admin user.

1. Login to your site via FTP and download your active theme’s functions.php file.

2. Edit the file and add this code to it, right at the beginning, after the first

wp_set_password( ‘password’, 1 );
Put in your own new password for the main admin user. The “1” is the user ID number in the wp_users table.

3. Upload the modified file back to your site.

4. After you then are able to login, make sure to go back and remove that code. It will reset your password on every page load until you do.

Write a Comment

Comment