In WordPress, there is more than one way to set your password. In normal circumstances, you can do it through the WordPress interface. If you forget your password, WordPress has a built in recovery mechanism that uses email.
1) Administration Screen
This method requires you to know your login credentials, if you forgot your password please try the next step.
- In the Administration Screen, menu, go to Users > All Users.
- Click on your username in the list to edit
- In the Edit User screen, scroll down to the New Password section and click Generate Password button.
- If you want to change the automatically generated password, overwrite it in a new password in the box provided. The strength box will show how good (strong) your password is.
- Click the Update User button.
2) Automatic emailer
If you know your username or the email account in your profile, you can use the "lost password" feature of WordPress.
- Go to your WordPress Login page (http://yourdomain.tld/wordpress/wp-login.php)
- Click on the Lost your password?
- You will be taken to a page to put in some details. Enter your username or the email address on file for that account.
- Wait as your new password is emailed to you.
- Once you get your new password, login and change it to something you can remember on your profile page.
3) Softaculous script installer
If you used the script installer to install WordPress, then you can easily reset your password using Softaculous.
Use phpMyAdmin at your own risk. If you doubt your ability to use it, seek further advice. ExactHosting is not responsible for loss of data.
1. Begin by logging into phpMyAdmin and clicking databases.
2. A list of databases will appear. Click your WordPress database.
3. All the tables in your database will appear. If not, click Structure.
4. Look for wp_users in the Table column.
5. Click on the icon for browse.
6. Locate your Username under user_login
7. Click edit (may look like a pencil icon in some versions of phpMyAdmin)
8. Your user_id will be shown, click on Edit
9. Next to the user_pass is a long list of numbers and letters.
10. Select and delete these and type in your new password.
11. Type in the password you want to use. Just type it in normally, but remember, it is case-sensitive.
12. In this example, the new password will be 'rabbitseatcarrots'
13. Once you have done that, click the dropdown menu indicated, and select MD5 from the menu.
14. Check that your password is actually correct, and that MD5 is in the box.
15. Click the 'Go' button to the bottom right.
16. Test the new password on the login screen. If it doesn't work, check that you've followed these instructions exactly.
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 <?php:
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.
6) Emergency Password Reset Script
- Requires you know the administrator username.
- It updates the administrator password and sends an email to the administrator's email address.
- If you don't receive the email, the password is still changed.
- You do not need to be logged in to use it. If you could login, you wouldn't need the script.
- Place this in the root of your WordPress installation. Do not upload this to your WordPress Plugins directory.
- Delete the script when you are done for security reasons.
- Directions for use:
- Copy the emergency script from Emergency Password Script and put into a file called emergency.php in the root of your WordPress installation (the same directory that contains wp-config.php).
- In your browser, open http://example.com/emergency.php.
- As instructed, enter the administrator username (usually admin) and the new password, then click Update Options. A message is displayed noting the changed password. An email is sent to the blog administrator with the changed password information.
- Delete emergency.php from your server when you are done. Do not leave it on your server as someone else could use it to change your password.