Having issues logging in to your site? Is your WordPress login not working? Don’t worry, we’ve got you covered. In this guide, we’ll show you how to fix the most common problems that cause the login to stop working.
The login is one of the most important pages for any WordPress website as it is what allows you to access your dashboard. We’ve already seen how to customize the login to make the most of it, but what can you do when the login stops working and you can’t access your site?
Unfortunately, this is a quite common problem for many users. The good news is that there are a lot of solutions that can be useful if you ever come across such a mishap. Before we go through the different solutions for each issue, let’s better understand why the WordPress login might not work properly.
Why does the WordPress Login stop working?
Many reasons may cause the WordPress login to stop working. There might be issues with the website files, servers, databases, plugins, themes, and more. In fact, problems with any of those elements are common causes of the issues in the login process.
These are some more frequent problems that might prevent the WordPress login to work properly:
- Cache and Cookies
- Login Credentials
- Problems with plugins
- Conflict with the theme
- Wrong WordPress login URL
- Error establishing a database connection
- The issue with the .htaccess file
- Not enough PHP Memory Limit
- Incorrect site URL
- Your WordPress site has some other issues (WSoD,
Don’t worry if you’re facing any of these issues. In the following section, we’ll show how you can solve them and regain access to your site.
WordPress Login not Working? How to Fix it
As mentioned earlier, there are several reasons and errors that may cause your WordPress login to stop working, so it can be hard to know exactly what’s going wrong and what to do to fix it. In this section, we’ll show you some of the solutions to the most common issues, so you know exactly what to do.
Depending on the problem you’re facing, you might need to edit some critical files from your website. That’s why before we start, we recommend you backup your WordPress website and make sure you save it somewhere safe in case you need to restore your site.
Now without further ado, let’s have a look at the solutions.
1. Clear Cache and Cookies
A web browser cache refers to the temporary files stored or hidden in your browser. Once you clear the cache, your browser will be updated with newer versions of the files that support WordPress when you reload the login page.
On the other hand, cookies are small files with data that are used to identify your computer in a network. WordPress uses cookies for authentication, so clearing them can also solve some issues with the login page. Before you do this, make sure that you have enabled them on your web browser.
To clear the cache and cookies on your web browser, go to Settings, head to the Privacy and Security tab, and click the Clear browsing data option.
Now you will need to select the browser data that you want to clear in your browser. Under the Basic tab, check the options for Cookies and other site data and Cached images and files. Finally, press Clear data.
That’s it, all your cache and cookies will be cleared on your web browser.
This is the process to clear cache and cookies using Google Chrome. If you’re using a different browser, you can check the steps in the following links:
Clearing your cache and cookies is one of the first things you should do when your WordPress login is not working. If that doesn’t work, check the next solution.
2. Check your Login Credentials
This is a very obvious solution that’s often overlooked. However, human beings tend to make mistakes and most of the errors in the digital world are caused by humans. So if you are not a robot, check whether you’re using the correct login username and password combination or not.
In fact, unless you’ve changed the default alerts, there will be an error message explaining what the issue is. Make sure that you’re entering the correct login credentials before you log in to your WordPress dashboard.
Alternatively, you can try to change your password by clicking the Lost your password link. You will need to enter your email address linked with the website and change the password through the verification email sent to you.
If none of that works, you may need to check your plugins.
3. Problems with Plugins
Sometimes, the plugins that you use can also create issues on your website and cause your WordPress login to stop working. It usually happens that there are conflicts between some of the plugins on your site or that there’s a security plugin blocking your login.
First, check if there are plugin issues. To do that, first, deactivate the plugins manually. For that, you need to use an FTP client or use the cPanel File Manager. If you are the website owner, your website hosting can provide you access to it.
For this demo, we’ll use an FTP client called FileZilla, but you can use any tool that you like. After you have accessed it, navigate to your website file directory and locate the wp-content/plugins folder. Then, right-click on it and rename the folder temporarily to something like “plugins_disable”.
Once you rename it, WordPress won’t be able to recognize or access the plugins file, so it will automatically deactivate all the plugins on your site. Even though you may deactivate plugins that you want to keep active, this is the fastest way of knowing if a plugin is causing issues with your login.
After that, try logging in to your website. If you can log in, you can confirm that the WordPress login wasn’t working because there was a plugin conflict. Now you need to find out which plugin is actually causing the problem and troubleshoot it. For that, activate the plugins one by one and try logging in until you find the one creating the issue.
Sometimes, security plugins may block user logins, so start by checking your security plugins.
For more information on how to deactivate plugins in bulk, check out this guide.
4. Conflict with your Theme
Similar to what happens with plugins, your theme might also interfere and create conflicts with your WordPress login. This is especially common when you use a custom login page for your website because the page might not be fully compatible with your current theme.
The good news is that it’s very easy to check if there is a theme interference that doesn’t allow you to log in to your website. Once again, you will need to access your website file directory using an FTP client and rename the theme folder to disable it just like you did it with the plugins before.
Open your FTP client and locate the theme folder that you are using on your site. Usually, you can find the theme folder under wp-content/themes. For this tutorial, we are using the Divi theme, so we’ll rename the Divi folder to “Divi_disable”.
Simply right-click on your theme folder and rename it. If you are not sure which is the current theme, ask the website owner or developer.
After deactivating the theme, try to log in to your website. If it works, you can confirm that your WordPress login was not working due to a conflict with your theme. If that’s the case, you can either check the theme files to identify and solve the issue or contact your theme support.
5. Wrong WordPress Login URL
Hiding or changing the WordPress login URL is one of the best ways to keep your website secure. It is also a common practice to keep your site safe from login and DDoS attacks.
If you have changed the login URL and now you can’t find it, you won’t be able to log in to your site. In this case, your best option is to deactivate the plugin you have used to modify the login URL.
You can easily do this following the same steps we described before to deactivate all plugins. Simply, open your FTP client, locate the plugins folder under the wp-content/plugin folder and open it. You will see the folders of all the plugins installed on your website.
Locate the plugin you used the change the login URL, right-click on it and rename the folder to deactivate it.
Then, enter the default URL of the login page adding /wp-admin after your website domain and you will be able to see the login page of your website. After that, enter the username and password to access your site as you would normally do.
Make sure that you remember how to access the login page after you have logged in again. And if you still want to make your website secure, you can reactivate the plugin to hide or change the login page again.
6. Error Establishing Database Connection
All the information and data of your website are stored in your database. If the database can’t be linked with your site, you may face some issues that might cause the WordPress login not to work.
There can be problems with the database connection if there is incorrect database information on your site. Furthermore, the issue might also occur if the database is corrupted or due to an unresponsive database server.
The good news is that you can easily repair your database connection issues in WordPress. But before we start with the steps, you need to ensure that your database credentials and database hosting information is correct. Contact your hosting provider and ask them for that but if you still can’t log in to your website, you might need to repair the database.
6.1. Fix Database Connection Error: Repair WordPress Database
To repair your WordPress database, locate and open the wp-config.php file of your website using an FTP client.
You will see all the configuration details of your website on this file. In fact, you can also find the database credentials here if you need to check them once again.
Now, add the following code snippet just before the “That’s all, stop editing! Happy publishing.” line and save the file.
define('WP_ALLOW_REPAIR', true);
Then, visit the link http://www.yoursite.com/wp-admin/maint/repair.php to complete the repair.
You will be able to see two options here: one to repair the database and the other to repair it and optimize it. If you don’t want to optimize the database, for now, you can just click Repair Database.
Once the process is complete, you should be able to log in to your WordPress website if the database connection was an issue.
If that doesn’t solve the problem and the login still doesn’t work, check the next solution.
7. Issue with the .htaccess file
The .htaccess is a configuration file for the server that handles all the permalinks. This means that if there are any problems with this file, this might cause the WordPress login not to work properly.
To fix this, you need to delete the .htaccess file and add it again to your WordPress website. Just open the FTP client connected to your website and locate the .htaccess file. Download it to your local computer as a backup and then delete the .htaccess file from your website from the FTP client.
Now try logging in once again and if you are able to access your website, it means that there were issues with the .htaccess files.
To make sure that your site works smoothly, you need to add the .htaccess file to your server. To do that, go to Settings > Permalinks and press Save Changes. You don’t have to change any settings or options here.
This will automatically create the .htaccess file in your server and your site will be up and running once again.
8. Not enough PHP Memory Limit
Another reason why the WordPress login might not be working is that there isn’t enough PHP memory limit. By default, the server memory of a website is above 64 MB but sometimes this isn’t enough.
If there PHP memory limit is too low, you will see an error and this might make your WordPress login to malfunction. If you see this type of error during login, you need to increase the memory limit manually.
You can easily do that with the help of an FTP client. Simply locate and open the wp-config.php file from your website directory. Then, paste the following code snippet before the “That’s all, stop editing! Happy publishing” line.
define( 'WP_MEMORY_LIMIT', '256M' );
This will increase the limit to 256MB. After you have added the code to the field, save it and open your login page. If you can log in to your website, then your WordPress login wasn’t working earlier due to limited PHP memory.
If after that you still get an error regarding the PHP memory limit, increase the limit to 512MB by editing the snippet and try again.
9. Incorrect Site URL
The site URL and WordPress address URL are two different URLs. You need to make sure that both URLs are the same so they reach the same site destination.
Even though these URLs are typically the same, it might not be the case if you’ve recently migrated your site or gone through a major update. If this is the case, you can easily make sure both URLs are the same with an FTP client.
To do this, locate and open the wp-config.php file from the FTP client and add the following snippet right above the “That’s all, stop editing! Happy publishing” line:
define('WP_HOME','https://www.yoursite.com'); define('WP_SITEURL','https://www.yoursite.com');
Make sure that you’re using the same WordPress address URL for both WP_HOME and WP_SITEURL.
After that, save the file and reload the WordPress login page. Now you should be able to log in without any issues.
NOTE: It seems obvious, but make sure that the entered site URL in the web browser is also correct. This might be useful if you access and manage a lot of websites.
10. Your site has other issues
All the above solutions assume that your site works properly. However, there may be other reasons that may be preventing you from accessing your WordPress login:
- White Screen of Death (WSoD): This is a completely white screen that appears on a WordPress site and can cause lots of headaches to site admins. If this is your case, have a look at this tutorial that explains how to solve the WSoD.
- WordPress Dashboard not loading: There may be different reasons why your dashboard might not load properly. You can find all the solutions in our guide to fixing the WordPress dashboard not showing.
More Reasons Why the WordPress Login is not working
We’ve listed some of the solutions to the most common problems of the WordPress login. However, if you’re still having issues and your login isn’t working, you can try the following solutions.
1. Problems with file and folder permissions
File and folder permission issues are relatively rare but they may also cause the WordPress login to stop working. All your browser directories are stored in files and folders that can be accessed from an FTP client or cPanel. If the wp-admin folder or the wp-login.php file contains the wrong permissions, your website won’t be able to access these files and folders. As a result, you won’t be able to log in.
If you think that this may be causing issues with your login, you can change their permission. To do that, connect your FTP client to the website server and locate the wp-admin folder and wp-login.php file. Right-click on them, select Permission and adjust the following numeric values:
- wp-admin folder numeric value: 755
- wp-login.php file numeric value: 644
Finally, press OK to save the changes.
Now, reload your website and enter the credentials to log in. If there were problems with file and folder permissions, you should be able to log in to your website.
2. Corrupted WordPress Files
If your core WordPress files are corrupted, it can affect your whole website and prevent the login to work properly. This isn’t a common issue but when it happens, it tends to occur in the wp-login.php file.
To overcome this problem, there is only one solution. You should go to the WordPress.org official website and download the latest version of WordPress. Then, extract the ZIP file and locate the new wp-login.php file. After that, connect the FTP client with your website server and upload the new wp-login.php file here.
Make sure that you overwrite the existing wp-login.php file to replace the old corrupted file with the new one.
If the corrupted file was stopping you from logging in to your website, now you should be able to easily log in once again.
Other Measures
If you’ve tried all of the above and your WordPress login is still not working, there are a few more things you can do to get your site up and running.
1. Ask your Website Host
If none of the mentioned solutions solved your issue with the login, you can just contact your web host. The reason you are not able to log in to your website might be related to server problems from your host’s end.
If that’s the case, they will provide you with some information regarding what the issue is and how to fix it. Make sure that you have one of the best WordPress hosting services with excellent support. The quality of a hosting company is apparent when there are problems and you need urgent help.
2. Restore Previous Website Backup
If your WordPress login is still not working, one of the last options that you have is to restore a previous backup. That’s easy if you have a backup system installed on your website.
To restore a backup, you can use an FTP client or the cPanel manager. If you need more information about this, have a look at our guide on how to back up a WordPress site.
Bonus: How to Customize the WordPress Login Page
Most admins don’t pay too much attention to the login, so 99% of WordPress sites end up having the same boring login page. However, customizing it can have several benefits. For example, improving the login page can be beneficial for online stores, membership websites, and affiliate programs. Customers will usually log in to place their orders or access their benefits, so it makes a better impression if you personalize the login page.
Apart from the design, you can also customize other things and make your site more secure. For instance, you can limit the number of login attempts to keep hackers away. On top of that, you can also customize the login page URL to make it harder to find and avoid brute force attacks.
There are a few options to edit the login page, but the easiest way is to use a dedicated plugin. There are several tools for this but for this demonstration, we will use Custom Login Page Customizer. It is a free and straightforward plugin that lets you easily customize your WordPress login page.
Install and Activate the Plugin
To start using this tool, you need to install and activate it first. In your dashboard, go to Plugins > Add New and search for the plugin. Once you have found it, click Install Now and then activate it.
Alternatively, you can install the plugin manually. If you aren’t familiar with that, you can go through our guide on how to install plugins manually for further details.
Customize the WordPress Login Page
After that, go to Login Customizer > Customizer and you will be redirected to the live customizer where you can edit the login page.
You’ll see many options here and you can virtually change anything. You can customize the templates, background, logo, form, fields, and buttons. Additionally, under the Other section, there are options to add custom CSS and JavaScript to customize your login page.
As you edit the page, you’ll see the changes on the right side of your screen with a real-time live preview. Once you’re happy with your customization, click Publish/Update to apply it to your site.
Now if you check the front end, you will be able to see your newly customized WordPress login page.
You can also edit the login page programmatically and through site builders. If you want more information about this, check out our tutorial on how to customize the WordPress login page. Additionally, if you want to try other tools, have a look at our list of the best plugins to customize the login page.
Conclusion
In summary, several reasons may cause the WordPress login page to stop working, so it may be hard to know exactly what the problem is. This occurs quite often and can prevent you from accessing your site.
In this guide, we’ve shown you how to solve the most common issues with the login page.
- Cache and Cookies
- Login Credentials
- Problems with plugins
- Theme interference
- Wrong WordPress login URL
- Error establishing a database connection
- The issue with the .htaccess file
- Not enough PHP Memory Limit
- Incorrect site URL
- Wrong permissions of files and folders
- Corrupted core WordPress files
If none of these solutions work for you, it may be because of problems with file and folder permissions and corrupted core files. If you try to solve this and the login page is still not working, you are left with only two options: contact your web host or restore a previous backup of your website.
Finally, we have also shown you an additional section on how to customize a login page with plugins. This can be very helpful for eCommerce stores, membership, and affiliate sites to make the login look more professional and add an extra layer of security to your website.
We hope that this tutorial was useful. If it was, share it on social media to help your friends solve their issues with the login page!
For more information on how to make the most of your site, check out these guides:
You’re welcome.