Resetting the admin account password of a WordPress setup using phpMyAdmin
A step-by-step guide:
Step 1: Access phpMyAdmin
- Log in to your web hosting account: Use the credentials provided by your hosting service.
- Navigate to phpMyAdmin: You can usually find this in the control panel (like cPanel, Plesk, etc.).
Step 2: Select the WordPress Database
- Find your database: In phpMyAdmin, you’ll see a list of databases on the left sidebar. Click on the database that corresponds to your WordPress installation.
- Identify the tables: Within the selected database, you will see a list of tables. Look for the table with the suffix
_users
(e.g.,wp_users
).
Step 3: Edit the Admin User
- Open the
wp_users
table: Click on thewp_users
table to open it. - Find the admin user: Look for the row where the
user_login
column matches the username of the admin account. This is typically “admin”.
Step 4: Update the Password
- Edit the user: Click the “Edit” link next to the admin user row.
- Change the password:
- Locate the
user_pass
field. - In the
Function
column next touser_pass
, selectMD5
from the dropdown menu. This ensures the password is encrypted. - In the
Value
column next touser_pass
, enter your new desired password.
- Locate the
Step 5: Save the Changes
- Save the changes: Scroll down and click the “Go” button to save your changes.
Step 6: Verify the New Password
- Log in to WordPress: Go to your WordPress login page (
yoursite.com/wp-login.php
). - Enter the new password: Use the username and the new password you set to log in.
Optional: Security Considerations
- Change the password again: Once logged in, it’s good practice to change your password again through the WordPress dashboard to ensure it is hashed properly using the latest WordPress standards.
- Update the salts: It’s also recommended to update your
wp-config.php
file with new security salts. You can generate these from the WordPress secret-key service.
Troubleshooting
- If you encounter any issues, ensure you are editing the correct database and table.
- Make sure you have selected
MD5
when entering the new password in phpMyAdmin. - If phpMyAdmin is not available, you can use a MySQL command-line tool or a different database management tool to update the password.
By following these steps, you should be able to reset the admin account password for your WordPress setup using phpMyAdmin.