If you have inherited a website developed in WordPress by another Webmaster and you do not know the access credentials. Or you have just lost your password and the mail does not arrive to retrieve it. I will explain a method to change WordPress password by PhpMyAdmin MySQL.
All you need is access to the control panel of the accommodation (cPanel, Plesk or whatever).
I will describe how to access phpMyAdmin and from the corresponding table change wp-admin password. If you are not in the habit of entering the database and making changes directly on it, you may feel a bit intimidated. Do not be afraid, I will go step by step and it will be much simpler than you think.
Change WordPress Password by PhpMyAdmin
The steps you must follow are the following:
1) Access the hosting control panel.
2) First of all, make a backup of the entire web. If something goes wrong you can always use it to restore the changes. In this other tutorial, I explain how to do it step by step from cPanel.
3) When you have your backup in a safe place, go to Files → File Manager and / public_html (or the WordPress installation folder) and locate the file wp-config.php. eye! sometimes this file is not in the same directory as the WordPress installation but at a higher level. However, you should locate that file. You can also do this step from an FTP client program.
4) Once located, open it and write down the name of the database of your web page. This step is important because it is possible that there are several databases in use in the hosting. There may even be several WordPress installations active each with its own database. Imagine that you do all the steps correctly but on a database that is not your own page, the crap can be capitalized.
5) From the hosting panel access to the phpMyAdmin database manager. In cPanel is located in Databases → phpMyAdmin.
6) Once inside phpMyAdmin it loads the database in use, its name you noted in step 4. Remember that all the databases that are in use appear in the left column.
7) Locate the wp_users table. It is possible that the prefix of the table is not wp_ but any other. Many developers, including myself, change the prefix of the tables as a security measure. In any case the structure of the same will always be miprefijo_users.
8) If there is more than one user, enter the row that corresponds to one with the administrator role by clicking “Edit”.
9) The row that you have to modify is user_pass. However, the password must be encrypted in MD5. And what is MD5? MD5 stands for “Message Digest Algorithm 5” which is an algorithm used, among other things, to encode passwords in databases. An MD5 hash is composed of 32 hexadecimal characters. To convert your password to MD5 follow these steps:
- Enter this web page, and put in the field assigned to it the password you want to encrypt.
- Click on the “Encrypt” button
- Just below the button appears a text that says: “MD5 hash for your_password is: 29698e0e8f212adfc62465d1e0c8789b”
10) Copy everything after the colon as it is your password encrypted in MD5.
11) Go back to your database and to the user_pass row. In the “Value” field there is the old password. Delete it and paste the text that you just copied.
12) Click “Continue” to apply the changes.
13) Verify that the changes you have made work by entering https://wpmethods.com/wp-admin.
Well, this is all, simple right? If you have followed this step-by-step mini-tutorial, you must have Change WordPress Password without any problems.