Sometimes you just can’t reset your WordPress password. Maybe you don’t have access to the associated email address or maybe the site isn’t able to relay reminder emails. Whatever the reason, it’s possible to change manage WordPress users and your username and password directly in the database.
However, before you start, firstly, make sure you’ve got a full backup of the database and know how to restore it as mistakes can kill your site! Secondly, make sure you’re confident you know what you’re doing. Any problems or worries, give us a call and we’re happy to help. Anyway, on with the tutorial.
1. Access your database
The most common way to access and edit your database is using PHPMyAdmin. This server-based software gives you a user-friendly interface to view and edit the data within your site. You’ll need the PHPMyAdmin address, the database name, your username and your password. The latter three items can be found in your wp-config.php file in the site root directory. The former will probably need to be accessed via the website hosting dashboard.
2. Find the ‘users’ table
This table will usually have a prefix ending in ‘_users’. For example, if the prefix is ‘mysite’, the table you’re looking for will be called ‘mysite_users’. Sounds complicated but it isn’t – you’ll see when you view the database.
3. Locate the user you want to update
Within the ‘users table you may find 1 or more records depending on how may users your WordPress site has. Next to the one you want edit, click ‘edit’. This is also a good opportunity to clear out old users you no longer need.
4. Edit the ‘user_pass’ line
You should now be viewing the user for which you want to update the password. On the line ‘user_pass’, choose ‘MD5’ from the function drop-down options and add the new password in the following field before clicking ‘go’ to save the new info.
5. Done
You should now be able to log into the site using the email address or username and the new password.