How to Add Expires Headers in WordPress (Easy to Follow Guide)January 2, 2020
How to update PHP in WordPress while avoiding errorsJanuary 22, 2020
Are you unable to login to WordPress and want to know why? In this article, we will address the issue of being unable to login, and will look at the various solutions to fix the issue of not being able to login to the platform. This can occur often, and there are many solutions that have been found to be successful over the years, which we will address in this article.
Password Reset is Not Effective
If you’re having a hard time logging into WordPress, you may think that you have simply forgotten your password, or that the solution might be to change your password. This is one of the first steps that many people take when unable to login.
In fact, changing your password is one of the first things that you should try if you cannot login to WordPress. You can reset your password by clicking on the “Lost your password” button, which will allow you to change your password without logging in. All you need to do is enter your login details like your username, and a password reset option will be sent to your email. If this method is still not working for you, there are other methods you can try.
A good way to change your password alternatively would be to check your other browsers if you are still logged in. If you more than one browser, or if you use the mobile site, check that as well. It might be the case that you are still logged in there, and you can attempt to change the password from there.
If your site is hosted on Linux systems, then you will also have the chance to change your password by accessing the WordPress database. This can be done by accessing phpMyAdmin, where you can edit the database. First, launch phpMyAdmin and locate the database of your site. Next, open the wp_users tab and scroll through the list of users until you find your user data. Click on “edit” located next to the row of your data. Finally, locate the user_pass field and replace the value field with your password. Select MD5 from the drop-down menu and click go. The password should now be changed.
Issues with Cookies
Another possible issue that does not allow you to login to WordPress might be with cookies. Cookies are required by some sites to collect your data and allow you to login without entering the data again. WordPress requires cookies to login to the site.
One possible solution maybe to enable cookies and then clear the cache. It is a simple solution, and it often works for this sort of issue. Here is what to do:
- Enable the cookies before entering WordPress.
- Clear the browser’s cache data. You can do this by pressing CTRL+SHIFT+DEL in Windows or COMMAND+SHIFT+DEL for Mac
- In the popup, select the clear the cache option
- Restart the browser and try to login.
The Domain Changed
Sometimes, you cannot login to WordPress site because of a change in domain. First, check the domain that is used for your WordPress login. You might notice that when you click your bookmark for WordPress login, it does not work.
There are a few things that may be interacting with the domain, such as SSL certificates that have been updated, the company has rebranded, the website address or the sub site address has changed, or there might be a plugin that you have recently installed that maybe interfering with your use of the site.
Whatever the reason maybe, you will need to check these things first in order to find the solution later. If the domain of the login page has changed, then that is a simple thing to correct.
Plugins Might Interfere
Maybe you cannot login to WordPress because some of the plugins are interfering with each other and are preventing you from accessing the site. For this reason, you might need to check your plugins. You can do that by disabling all plugins and trying to access the login site. Then try enabling them one by one to identify which plugin is causing the issue.
If you want to deactivate all plugins in WordPress, then you need to connect to your hosting site with the FTP client. You can disable plugins on your administration site, or you can remove them from the folder entitled: /wp-content/plugins/folder.
Once you disable or remove the plugins, try logging in to your WordPress again. If you are now able to login, then you can safely confirm that a plugin was causing issues. The next step would be to discover which plugin is causing the issue. You can do that by enabling the plugins one by one and then see which one is disabling you from logging in.
If you are using custom themes for your WordPress, especially those themes that include a custom login site, then that could be the issue here. There may have been an update to the theme, which can cause you not to be able to login.
The first thing to try here is to revert back to the default WordPress theme. You can do this by renaming the active theme folder, wp-content/themes. This will cause WordPress to access and use the default theme and allow you to login again. You can use your theme again after logging in.
When the theme is active, use this code to identify the problem:
<?php ini_set('display_errors','1'); ini_set('display_startup_errors','1'); error_reporting (E_ALL); include('index.php'); ?>
Login Files MayBe Corrupted
Another component that may be causing the issue of being unable to login to WordPress may be that the login files are corrupted, possibly because they are bad or were uploaded incorrectly.
The issue here could be in the wp-login.php file itself. If it is corrupt or installed incorrectly, then it might be the root of your problem. If the file itself is corrupt, then this is the issue you should focus your attention on. Doing a fresh install of the file might do the trick.
The best option for you if you have recently deleted or moved the login file (wp-login.php) would be to upload it and install it again. Firstly, you should backup your files before doing this. Next, delete the wp-login.php file from your server and upload it again. The final step would be to edit the file itself by applying these configurations:
Go to the retrieve password part, which is found under //redefining user_login.
Replace $user_login = $user_data[“user_login”]; with $user_login = $user_data>user_login;
The login issue could possibly because of the 404 error on the site or if the site is redirected from the original address. Maybe the URL of the site has been updated, or the .htaccess file maybe corrupt.
The URL issue can occur because your WordPress identifies the URL of where WordPress is installed, while the site URL uses the address of your website. This maybe causing the issue and confusion between the two URL addresses. This issue especially applies to you if you have recently changed the location of your WordPress core, or if you have moved your files for install. The anomaly between these two addresses might be causing you the problem.
As we have already mentioned, the .htaccess could also be the root of the problem. The solution maybe to alter this file to get your login working again, as you cannot login to WordPress because the file is corrupt. First, you need to establish whether it is really the cause here. First, you should rename the file, and then delete it. You can do this by using the FTP viewer. Use the site with FTP viewer and do the following:
- Open the public_html folder
- Find the .htaccess file and right-click on it
- Rename it to .htaccess.old
- Try logging in again
If the login site now works and you can login, it means that the issue is solved, and that the problem was with the .htaccess file.
Maybe you cannot login to WordPress because the files that you have uploaded or installed to your site is too large for the server to process it. You will see if this is the problem quickly, and you will be able to fix the issue without losing access to your WordPress site or account.
Look at the memory capabilities of your server. If your files are exceeding that amount, then you can try deleting those files and trying to login again. For the next instances, you will need to be careful not to exceed the memory potential of your server again.
Contacting WordPress support is always a great idea if you are encountering an issue. If you cannot login to WordPress, then you can ask the support team or try to ask other users on the forums. The community is large, and they are always willing to help other people with issues. Try sharing on that specific forum and wait for responses. For convenience, use a password manager (LastPass or Dashlane) to store and retrieve passwords. It's much easier and saves you the trouble. Some password managers, such as NordPass, offer their services free of charge.
If you enjoyed reading this article on cannot login to WordPress, you should check out this one about how to fix the WordPress missing a temporary folder.
We also wrote about a few related subjects like
WordPress publishing failed,
jQuery is not defined,
WordPress stuck in maintenance mode,
WordPress sorry, you are not allowed to access this page and
how to fix the http error when uploading images to WordPress.