Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Changing Admin Password Through Database

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 431
    Comment on it

    How to Change Admin Password Through Database?

    Hello reader's !
    In this tutorial I will guide you about "how you can Change Admin Password through database".
    SO read the complete tutorial and follow the steps and implement it same in your WordPress site.

    In WordPress, there is more than one way to set your password.

    First Method:-
    Normally all user can use the default way of WordPress to reset password. If you forget your password, WordPress has inbuilt recovery method that user email. Just clicking "Lost your password" link. In WordPress admin panel a new window appear and ask your email address(enter your email address), now WordPress will send you a email to reset your new password link. With this link you can easily set your new password.

    Second Method:-
    The other way is "Through MYSQL Command Line":-

    In this method you have to follow some step.

    1. Open your MySQL.
    2. Enter your password than connect.
    3. Select name of database i.e(WordPress).
    4. "show tables;" (you're looking for a table name with "wp_users").
    5. "SELECT ID, user_login, user_pass FROM wp_users;" (this gives you an idea of what's going on inside).
    6. "UPDATE (name-of-table-you-found) SET user_pass="(MD5-string-you-made)" WHERE ID = (id#-of-account-you-are-reseting-password-for);" (actually changes the password).
    7. "SELECT ID, user_login, user_pass FROM (name-of-table-you-found);" (confirm that it was changed).
    8. Exit and login WordPress admin panel with your new password.



    Third Method:-
    Run the Update Query
    You also can change or Update Password directly by running the update query.

    "UPDATE (name-of-table-you-found) SET user_pass = MD5('"(new-password)"') WHERE ID = (id#-of-account-you-are-reseting-password-for);" (actually changes the password) 



    Fourth Method:-
    Change Password Through FTP:-
    There is also an easy way to reset your password via FTP, if you're Logged-In as the admin user.

    1. Login to your site via FTP and download your active theme's functions.php file.
    2. Edit the file and add this code to it, right at the beginning, after the first
    <?php: 
    wp_set_password( 'enter your new password', 1 );
    

    Put in your new password for the main admin user. The "1" is the user ID number in the wp_users table. Usually "1" ID assign to admin of the site.

    1. Upload the modified file back to your site.
    2. After this you are now able to login, but make sure to go back and remove that code otherwise It will ask you to reset your password on every time when page loaded or refreshed.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: