Pages

Monday, September 10, 2012

How To Change WordPress Admin Password From SQL Database Source

Rarely you will face such a situation when you will need to change your wordpress password from SQL database because if you ever forget your password you can use the Forgot Password feature using which your new password will be emailed into your inbox. However if your website gets hacked or due to any reason you lose access to both your email and wordpress than such a sitution can be handled by changing the password from SQL.

If you are a non-programmer even then you can’t go wrong with this process as it is too simple but make sure that you don’t change anything other than mentioned in the steps below.

Open Hosting Account.
Select PhpMyAdmin from your hosting. In Screenshot Below I have Shown PhpMyAdmin in Cpanel Hosting

How to reset WordPress Admin Password from SQL

Now Select your WordPress database from the dropdown menu in Left Sidebar. After you select the appropriate database the page will automatically reload and your tables will be visible.
Now look at the top navigation bar and click on the SQL tab.
In the Text area type the following code

UPDATE `wp_users` SET `user_pass` = MD5( "new_password_here" ) WHERE `wp_users`.`user_login` = "admin_username";

Here you will replace new_password_here with your new password you want to set and admin_username with new administrator username.

Code for How to reset WordPress Admin Password from SQL

Now click on the Go Button and your Username and password will get changed.

Login into your wordpress account with new username and password.This method works on self hosted wordpress.


0 comments:

Post a Comment