Have you lost access to your WordPress administration panel? Is the "I forgot my password" function not working because of mail problems? Don't panic. In my experience as a WordPress DeveloperWhen a customer is locked out of the panel and every minute counts, the most direct way to regain control is to change password from database using phpMyAdmin. Although it sounds technical, I will guide you step by step to do it safely and effectively.
I use this method as a last resort when conventional ways fail. It is especially useful if the site has been compromised, recovery emails do not arrive, or you need emergency access to resume running the business as soon as possible. Let's go through the process so you can get your site back up as quickly as possible.
Why would you need to change your WordPress password with phpMyAdmin?
Before going into the "how", I like to clarify the "why". I usually resort to this method in critical situations such as:
- Failure in the recovery function: The most common cause. Your WordPress doesn't send emails, or you don't have access to the email address associated with your administrator account.
- Website hacked: If an attacker has changed your password and email, phpMyAdmin is often the only way to regain access to clean up the site.
- Migration or server configuration: Sometimes, during a migration or configuration change, mail functionality may break down temporarily.
- Total oblivion: You simply don't remember the password or the email associated with the administrator account, something that can happen on older sites.
Whatever your case, the goal is the same: reset your password securely to manage your content again.
CRITICAL ACTION! Before You Begin: Make a Backup Copy
We will directly edit your site's database. A single mistake here could make your site inaccessible. As a rule of thumb in my projects, I always make a full backup of the database before touching anything.. Most hosting panels (such as cPanel) allow you to export it with one click. Don't skip this step: it's your safety net.
Step by Step: How to Change WordPress Password phpMyAdmin
Now, let's get down to business. I have divided the process into 5 simple steps. Follow them carefully and you will have a new password in minutes.
Step 1: Login to phpMyAdmin
phpMyAdmin is a tool written in PHP to administer MySQL from the web. In practice, almost all hosting providers include it in their panels.
Access varies slightly depending on your hosting provider. I usually find it like this:
- In cPanel: Log in to cPanel. Go to "Databases" and click on "phpMyAdmin". It will open in a new tab with logged in session.
- In Plesk: Under "Websites & Domains" > "Databases", click on the "phpMyAdmin" icon next to your WordPress database.
- Other Panels (Hostinger, SiteGround, etc.): Search for "Databases", "Database Administration" or "MySQL" and enter phpMyAdmin.
If you have trouble finding it, a trick that works for me: look for "access phpMyAdmin" in your hosting documentation. They usually have the exact path.
Step 2: Locate your Database and Table `wp_users`.
Once inside phpMyAdmin, you will see a list of databases in the left sidebar. If you only have one WordPress site, you will probably only see one or two (the other may be `information_schema`).
How do I know which is the correct database?
If you are not sure, you can find the name in your configuration file `wp-config.php`, in the root of the installation. Access it from your hosting's File Manager or via FTP. Look for a line like this:
define( 'DB_NAME', 'your_database_name' );
Once the database is identified, click on its name in the sidebar. You will see all its tables.
Now look for the table that stores the users. By default it is `wp_users`. For security, many installations use a prefix other than `wp_`, so it could be `wp_abc123_users` or similar. The key: ends in `_users`. Enter this table.
Step 3: Edit Administrator User Row
When you enter the `_users` table, you will see all the users. Each user is a row. Look at these columns:
- ID: Unique identifier of the user.
- `user_login`: The user name with which you log in.
- `user_pass`: The password, hashed.
- `user_email`: The user's email.
Locate your administrator user in `user_login` and click on "Edit" (or the pencil icon) at the top of that row.
Step 4: Enter New Password and Select MD5 Function
Here is the key point. When editing you will see a form with all the user's data. Locate `user_pass`.
You will see a long string of characters: it is your old hashed password. To change it:
- Completely erases the current value in `user_pass`.
- Enter your new password in plain text. Use a strong password. For example: `MyNewSecurePassword!2025`.
- In the "Function" column to the left of the field, choose MD5.
Attention! Do not forget to select MD5
If you omit MD5your new password will be saved in plain text and you will not be able to log in. WordPress requires it to be hashed. When you select MD5, phpMyAdmin encrypts it before saving it. WordPress will recognize that hash and, on the first successful login, will re-hash it with its most secure and modern method.
Technical detail: although WordPress no longer uses MD5 by default, it still accepts it for compatibility. In audits and maintenance that I do, I have verified this behavior in multiple versions. If you want to go deeper, check the official WordPress documentation.
Step 5: Save Changes and Verify
Enter the new password, choose MD5 and scroll to the end to save with "Continue" (or "Go").
If all goes well, you will see a green "1 row affected" message.
Now verify access:
- Opens an incognito window (avoids cache problems).
- Go to `tusitio.com/wp-admin`.
- Enter your username and password new password.
- Click on "Access".
If you followed the steps, you should be able to log in without any problems.
Post-Access Security Best Practice
After regaining access, I recommend going to "Users" > "Your Profile" and change the password again from WordPress itself. This way it will be re-hashed with the current algorithm. This is what I systematically do after an emergency login.
Frequently Asked Questions (FAQ) about Change Password in phpMyAdmin
What happens if I do not select the MD5 function?
The password will be in plain text and the validation will fail. You will have to repeat the process and select MD5.
My table prefix is not `wp_`, what do I do?
It's all right. It's good safety practice. Look for the table ending in `_users` (for example, `wpab_users` or `site1_users`). If you have any doubts, check `wp-config.php` and the line $table_prefix = 'tuprefix_';
.
Is 100% secure to change the password with phpMyAdmin?
The process is safe if done carefully. The biggest risk is human error editing the database, hence the backup. Be sure to log in via HTTPS to your panel and phpMyAdmin.
Are there other ways to reset the password without accessing the mail?
Yes, and I use them when they fit best:
- Via FTP: Upload a temporary script to create an admin or reset the password. Requires knowledge and delete it afterwards.
- WP-CLI: If you have SSH, it is my favorite for speed and traceability:
wp user update USERNAME --user_pass=NEW_PASSWORD
.
Conclusion: Take Back Control of Your WordPress
Losing access to your WordPress is stressful, but change password from phpMyAdmin is a reliable solution when all else fails. With this step-by-step guide, you have seen how to locate the user table and securely modify the administrator password.
Always make a backup before touching the database, check the overall security of the site, keep plugins and themes updated, and use a password manager to avoid repeating this problem.