How to Reset Your WordPress User Name and Password with phpMyAdmin

February 10, 2008 by Gurmit Bal

When you download and install WordPress, it automatically assigns your user name as ‘admin’ and generates a random password for you to log in to your WordPress Administration area. Many people keep using these values of user name and password. Not a good idea especially if you keep using ‘admin’ as the user name because then a hacker only has to crack your password. But if you change the user name to something other than the default ‘admin’ then the hacker will have to crack not just your password but your user name as well. This will make a hacker’s job more difficult and thus your installation a bit more secure.

You can easily change your WordPress user name and password with phpMyAdmin if you have access to phpMyAdmin - most web hosting companies provide access to phpMyAdmin; if yours doesn’t then its time to change your web host :-)

Before proceeding with this procedure, you should backup your WordPress Database if you haven’t already done so. If you don’t know how to backup your WordPress database, you can do so by following the procedure outlined in my article How to Backup Wordpress Database with phpMyAdmin (opens in new window).

Procedure to Change Your WordPress User Name and Password with phpMyAdmin

  1. Log on to your phpMyAdmin and you will be on the screen shown below.
    phpMyAdmin
  2. Click on the Databases (as I have pointed to with a red arrow in the image above) and you will be on a screen that shows all the databases that you might have created in your account. Click on the WordPress database and you will be on a screen showing all the tables in your WordPress database as shown in the image below.
    Word Press Tables
  3. On this screen, look for the wp_users table - the one I pointed to with a red arrow and then click on the browse button - the one I circled with red in the image above. Note that this button is not labeled as ‘browse’ but if you hover your mouse pointer at it, it’ll show ‘browse’. Once you click on this ‘browse’ button, you’ll be on a screen as shown in the image below.
    Word Press Users
  4. The screen above will show one or all your Wordpress users if you have created more than one. The pencil shaped button that I circled in red in the above image is the edit button. Click on it and you will be on a screen as shown in the image below.
    Word Press Log in
  5. In the screen as shown in the image above, look for the user_login field and look across under the value field and you’ll see your default user name as ‘admin’. Delete that and type in your new user name. I recommend you use letters and numbers for your use name and make it at least 8 characters long. Then look for user_pass field, which should be just under the user_login field as shown in the image above. Now look across under the value field and you’ll see a long string consisting of numbers and letters; that is your current password, encrypted. Delete that and type in your new password. Again I recommend a minimum of 8 characters though ideally you should use around 12 characters. For better protection, you can use capital letters, small letters and numbers; keep in mind that user name and password are case sensitive, so to log on to your Wordpress administration area you will have to type in your user name and password exactly as you type it here.
  6. After you have typed in your password, look for the ‘Function’ field corresponding to the user_pass field and use the the drop down menu to select MD5 as shown in the image above. MD5 is used to encrypt your password.
  7. Note down your user name and password exactly as you typed in above; you’ll need these to log on to your WordPress admin area. Look towards the right bottom of your screen and you’ll see a ‘Go’ button. Click on it. If everything goes well, the next screen will show the SQL query and your new user name and password in now active. Log on to your WordPress admin area to make sure that your new user name and password is working.

Once again I strongly recommend that you backup your WordPress database before you carry out the above procedure as you are directly modifying the database and if for any reason you screw up the database, your whole WordPress powered site may become unavailable and your only choice will be to restore it from your backup.





Stumble it!      Subscribe to my feedSubscribe to my Feed in a reader

Post a Comment