- The most common reason is , of course, using the wrong username or password.
Solution: Start by requesting a new password at the same URL you normally log in to. Then follow the instructions.

2. You did not receive an email!
Solution: Check your spam folder. If there is no email there , consider whether you have used the correct username/email address.
3. You cannot find an email despite checking spam and email address.
Now it’s a bit trickier. If you have ssh access to your hosting , list users with the command”wp user list”. Check that you are listed and then change your password. Guide: https://developer.wordpress.org/cli/commands/user/update/
4. You do not have access to ssh and therefore cannot change login that way.
Solution: Create a new user by entering some code. You should add this code to functions.php in your active theme.
ATTENTION! Do not forget to remove the user afterwards.
add_action( 'init', function () { $username = 'admin'; $password = 'password'; $email_address = 'webmaster@mydomain.com'; if ( ! username_exists( $username ) ) { $user_id = wp_create_user( $username, $password, $email_address ); $user = new WP_User( $user_id ); $user->set_role( 'administrator' ); }
5. You still can’t log in when using the new user (admin) and password (password)
Now there may be some other explanations. One of them could be a security plugin that locks you out and prevents you from logging in. Most of them give some variant of error message.
Solution: Connect via ssh or a file manager and remove the security plugin.
SSH: wp plugin deactive plugin name
Via ftp or file manager: Locate the folder and delete the folder. It is found as a subfolder in wp-content/plugins.
6. You still can ‘t log in
Solution: Now you need to remove all plugins. Either one by one and check between each or all at once.
I would use them all at once:) Don’t forget to make a note of which plugins you had or better yet rename the the plugins folder so you can move them back when you solve the problems.
There may be other problems like PHP version and such. You should probably ask someone for help in that situation
Leave a Reply