The access credentials to the WordPress administrator are stored in the database assigned to it, so it is possible to modify them by following several steps:
First of all, we must access phpMyAdmin from our control panel to manage the WordPress database (
How to access phpMyAdmin)
Once inside, we will need to go to the WordPress users table as shown in the following image:
Here you will see the databases created in your hosting account along with their respective tables.
You must select the corresponding database and go to the "wp_users" table.
Once inside, a list of users created in your WordPress will appear. If you have never created another one, only one will appear — the administrator:
To edit the login credentials, click on "Edit" in the section of that same user:
Next, the window to edit that user will open. You must go to the "user_pass" field:
Here you must enter the password you want in the "Value" column, and in the "Function" column you must select MD5:
Finally, save the changes by clicking on "Continue" in the bottom right corner:
Now, if you try to log in with the new password, you will be able to access correctly.
IMPORTANT: Sometimes saving the password in MD5 does not work correctly. That is, phpMyAdmin saves it properly but does not allow access with the entered password. For those cases, below we provide a text code. You only need to create a file inside your hosting account and insert into it the password you want to assign:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>MD5 Password Generator</title>
</head>
<body>
<h1>MD5 Password Generator</h1>
<form method="get">
<input type="text" name="pass" placeholder="newpassword" required>
<input type="submit" value="Submit">
</form>
<?php
if (isset($_GET['pass']) && $_GET['pass'] !== '') {
$pass = $_GET['pass'];
$md5 = md5($pass);
echo "<p>Your new MD5 password is: <strong>$md5</strong></p>";
}
?>
</body>
</html>
Finally, you only need to access the file you created with this text from your browser. We have named it md5test2.php and uploaded it to our hosting:
Here you just need to enter the password you want and click "Submit", and it will automatically generate the password in MD5 format.
Finally, copy this generated code and return to phpMyAdmin. Paste it into the "user_pass" section, select MD5 as indicated in the previous steps, save the changes, and the password change will be completed.