Unable to login error on WordPress is a common problem that users may encounter. The cause can be due to many factors such as plugin conflicts, problems with user accounts, or incorrect settings in the configuration file. In this article, we will show you how to fix the unable to log in error on WordPress quickly and effectively.
Step 1: Check Username and Password
First, you need to make sure that you are using the correct administrator account username and password. If you forget your password, you can recover it using the “Lost your password?” (Forgot password) of WordPress.
How to Recover Password
- Visit the WordPress login page and click on the link Forgot password?.
- Enter the email address registered to your administrator account.
- You will receive an email containing a link to reset your password. Click the link and create a new password.
Step 2: Disable Plugin To Check For Conflicts
Another common cause of failed login errors is conflicts between plugins. You can test and disable plugins temporarily to see if the issue is resolved.
How to Disable Plugins Via FTP
- Connect to your website via FTP using an app like FileZilla.
- Go to folder wp-content/plugins and rename the folder plugins wall plugins_old.
- Try logging in to your website again. If you logged in successfully, one of the plugins is causing the conflict.
- Rename the folder plugins_old wall plugins and activate each plugin one by one to identify the plugin causing the problem.
Step 3: Clear Browser Cache
Sometimes, the failure to log in error can be caused by old browser cache. You can try clearing the cache to see if that fixes the problem.
How to Clear Browser Cache
- Open your browser and access settings.
- Select item Privacy & Security (Security & Privacy) and click Clear browsing data (Clear browsing data).
- Select clear cache and cookies, then click Clear data.
- Try logging in to your WordPress site again.
Step 4: Check the wp-config.php File
If you’ve followed the steps above and still can’t sign in, check your files wp-config.php to ensure that there are no problems with the database or configuration.
How to Check wp-config.php File
- Connect to your site via FTP and find the file wp-config.php in the root directory of your WordPress site.
- Open this file and check the database information such as database name, username, and password. Make sure everything is correct.
- If the wp-config.php file is modified or corrupted, repair it or upload the wp-config.php file from a backup.
Step 5: Create a New Admin User via PHPMyAdmin
If the above steps do not resolve the issue, you can create a new administrator account through PHPMyAdmin and try logging in with that account.
How to Create a New Admin User Using PHPMyAdmin
- Access your hosting’s cPanel and open PHPMyAdmin.
- Select your WordPress database and click on the table wp_users.
- Click Insert (Insert) and add new account information (including username, MD5 encrypted password, and email address).
- Go to table wp_usermeta and add meta key wp_capabilities with value
a:1:{s:13:"administrator";b:1;}
to create an administrator account. - Try logging in again with the new admin account.
Tips to Avoid Login Errors
- Back up your website regularly: Regular backups help you restore your website quickly if something goes wrong.
- Update plugins and themes: Make sure all your plugins and themes are updated to avoid conflicts.
- Use strong passwords: Make sure the admin account password is strong and difficult to guess to prevent hacking.
Login error
Unable to login error on WordPress can cause a lot of inconvenience, but with the steps above, you can easily fix this problem. From checking your account, disabling plugins, to creating a new admin account via PHPMyAdmin, you can quickly regain access to your website. Always remember to back up and secure your website to avoid similar problems in the future.