WordPress not recognising admin password it was set up with.

November 9, 2019 102 views
Apache Ubuntu 18.04 WordPress

After setup finished I attempted logging into my WP admin acount. wp-login.php page doesn’t load at all, or when it does password is “incorrect”, except it isn’t. Password is literally the same as it was during initial configuration.
Tried “restoring password” (predictably it didn’t work), rebooting vps and even deleting and creating new droplet (to be fully sure, that WP is installed correctly). Even skipped certbot step (still wasn’t working when I used it so not big loss).
I can access droplet via console though (hooray!).

What is interesting is that this issue seems to be affecting only website/droplet created after the recent “support portal "crash”.

Sometimes even the text-only default WP website won’t load or load but extremely slowly. Both issues are tested on Firefox, Chrome and Opera mobile. Wi-Fi and mobile 4G internet.
Connection quality seems to be random. Login denial is permanent.

1 Answer

Hello, @Illusive

Have you tried to manually change the password from the database itself? If you’ve installed phpMyAdmin you can change the password from there or do it manually from the command line as well:

You can reset the password from phpMyAdmin using the following steps:

  1. Access phpMyAdmin in your browser

  2. Click on the name of your WordPress database.

  3. Next click on the wpusers table. (your database might have different prefix, e.g jpipousers, but you still need to access the _users table)

  4. Click on Edit beside your WordPress admin user.

  5. In the user_pass field, paste your password by pressing Ctrl – V and from the drop-down, select MD5. Finally click on Go. You should now see a success message from phpMyAdmin saying the database record was updated.

You can do this manually via the command line:

  1. Access mysql as root:

    mysql -u root
    
  2. List your databases:

    show databases;
    
  3. Select your database:

    use yourdatabasename;
    
  4. List the database tables:

    show tables;
    
  5. Update the password using this query:

UPDATE `wp_users` SET `user_pass`= MD5('yourpassword') WHERE `user_login`='yourusername';

Keep in mind that if you have different prefix for the database you will need to change wp_users to match your database prefix.
Once this is done you should be able to access your database.

Let me know how it goes.

Regards,
Alex

Have another answer? Share your knowledge.