can’t login to wordpress admin panel – 5 Solutions

For some reason I can no longer log into my worpress admin panel. I don’t know what should I do. I found the way to solve this problem by visiting the Internet.

There are many ways with “forgot wordpress password or change wordpress password” on the Internet, but none of them seem to be complete. That is why I decided to write this post.

If you know a method that is not listed below, just tell you and I will update it

Resetting Your Password

1.Through the automatic emailer – Click Lost Password

If you remember your username or the login email account in your profile, you can use the “lost password” feature of WordPress.

And that’s probably the simplest way, I think.

lost-password

  1. Click on the Lost your password? (picture)
  2. You will be taken to a page to put in some details. Enter your username or the email address on file for that account.
  3. Wait a moment, your new password is emailed to you.
  4. Once you get your new password, login and change it to something you can remember on your profile page.

2.Through phpMyAdmin panel

First by logging into phpMyAdmin and clicking databases. If you are not yet familiar with it, we recommend an article in Resources.

wp_users

2

1.Change your user_pass MD5 value – 5d41402abc4b2a76b9719d911017c592 //  Login password is hello

2.Change your user_email – Then, you can use the first method.

Note: default user_login is admin.

3.Through MySQL – SQL

Logging into phpMyAdmin and clicking databases.

UPDATE wp_users SET user_pass = MD5('PASSWORD') WHERE wp_users.user_login ='admin' LIMIT 1;

4.Through PHP

  1. Create a php file – password-resetter.php
  2. Code:
<?php
//password resetter
include("wp-config.php");
include("wp-blog-header.php");
if (empty($_POST['emergency_pass'])) {
?>
    <form method="post">
      set admin password: <input name="emergency_pass" type="password" />
      <input type="submit" />
    </form>
<?php
} else {
    $sql = "UPDATE ".$wpdb->users." SET user_pass = '".md5($_POST['emergency_pass'])."' WHERE User_login = 'admin'";
    $link = $wpdb->query($sql);
    wp_redirect('wp-login.php');
    exit();
}
?>

3. Uploaded to the root directory through Ftp.

4. Run.  http://yourblog.com/password-resetter.php

5.Through FTP

1. Login to your wordpress blog via FTP and download your wordpress 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( 'password', 1 );

Put in your own new password for the main admin user. The “1” is the user ID number in the wp_users table.

3. Upload the modified file back to your site.

4. After you then are able to login, make sure to go back and remove that code. It will reset your password on every page load until you do.

I hope that these help to you!

Related Posts

How to check wordpress theme for malicious code