If you are logged out of your WordPress website and can’t access wp-admin, this can be frustrating especially if you don’t know what caused the issue or why you were logged out. You might fear that your site has been hacked or that you have lost all your data.
But don’t worry. You are not alone. Many WordPress users face this problem at some point, and there are many possible reasons for it. Some of the common causes are:
- Your internet connection is slow or unstable
- Your browser cache is outdated or corrupted
- Your login credentials are incorrect or forgotten
- You are blocked by a security plugin or firewall
- Your browser is incompatible or has extensions that interfere with WordPress
- Your network is blocking WordPress or has DNS issues
- You have changed your WordPress URL and forgot to update it
- You have installed a faulty theme or plugin that breaks your site
- You have a problem with your file permissions, PHP limit, .htaccess file, site URL, core WordPress files, database connection, or hosting support
- You have made a mistake in your code and caused a PHP syntax error
Any of these issues can prevent you from accessing wp-admin and managing your site.
In this guide, I will show you how to first troubleshoot and then resolve the issue to get access to your wp-admin.
If you already have an idea of what’s wrong, just click on the issue that matches your situation in the table of contents and follow the instructions. However, If you don’t know what’s causing the issue, you can start from the top and work your way down until you fix it.
So let’s get started!
1)Troubleshooting Internet Connection and Browser Issues
If you can’t access your wp-admin, the first step you should do is to check your internet connection. A weak or unstable connection can prevent you from accessing the site.
You can check your internet connection by refreshing the page. Sometimes a network glitch can disrupt the loading of the web page, so simply refresh your wp-admin page. If it loads okay, then it means the internet connection is stable and working.
You can also test other websites and see if they load without issues. If they do, then the problem is not with your internet connection.
If your internet connection is unstable, you can try restarting your modem. Turn it off for a few minutes and then power it back on. This may resolve the connectivity issue.
You can also consider using a different network, such as mobile data or another wifi, and try accessing the wp-admin there. This can confirm whether the issue is network-related or not.
After checking your internet connection, the next step is to clear your browser cache. This is also one of the causes of why you are unable to access your wp-admin page.
Different browsers have different settings for clearing cache, but usually, it is through the History tab in the settings. There you will see a More Tools option.
I am showing you in Google Chrome because it is a common browser. To clear the cache in Google Chrome, click on the three dots in the upper right corner, and in the dropdown menu, you will see History. Click on it and once opened, you will see a Clear Browsing Data option in the left sidebar. Click on it and it will open a popup window where you can clear your cache.
But do remember that it will clear all your other passwords too, so I suggest selecting the time range for the past hour. Doing so will only clear the past hour’s cache, as you might have probably caused the issue recently. If this does not work for you, you can select the last 24 hours if you have made changes in that time period.
Now try accessing your site again. If you are still unable to log in to your site’s wp-admin, then you can open a different browser or use an incognito tab of the current browser to access your site’s wp-admin, as sometimes the browser can also cause the issue If there is no success, then proceed to the next step.
The next step is to clear your WordPress cache, as most modern hosting platforms automatically cache your site on their hosting so that your site loads fast and your resources are saved by not having to execute the code again and again.
Check your hosting interface if there is any cache configuration. You will see an option to clear it. As I am using Hostinger, you can see the image below for the option to clear the cache in Hostinger.
These are the initial steps to troubleshoot your wp-admin access issue, and they should work for most users. However, if you still can’t access your wp-admin after following these steps, you have another option: WordPress Recovery Mode. This feature lets you fix fatal errors on your site and regain access to your dashboard. To learn how to use it, check out How to Use WordPress Recovery Mode.
Another common reason why some people can’t access their wp-admin page is their login credentials are incorrect which you can learn in the following method to fix it.
2) Login Credentials Are Incorrect
One of the most common reasons you might not be able to login to your site is that you have entered the wrong password. Believe me, it happened to me many times and I thought there was some problem with my WordPress, but later I found out I was putting wrong credentials.
It’s not only because you forgot your password. There are other reasons why you might be putting the wrong password. For example, your site might have a lot of admins and there is a chance that some admin might change the password without notifying you. Or maybe someone hacked your WordPress and changed your password. Whatever the reason might be, let’s find out how to recover our password in WordPress.
The first way is to use the built-in WordPress recovery feature which is found on your login page. Just click on the ‘Forgot Password’ link and it will ask you for your email address.
Put your administrative email address there (the email you used on WordPress) and you will receive an email with the instructions for changing the password.
But if for some reason you don’t receive the email or you don’t have access to the email, then the other option we have is to change the password manually using PhpMyAdmin in your WordPress hosting.
I know if you are not familiar with the technical things, you might think it will be difficult, but if you follow the steps carefully with me, you will change it in no time.
First, find your database name by going to File Manager > Root Folder (public_html) > wp-config file. Open it and you will see the database name there as you can see in the image below of my database name:
Then, open your site’s database in the cpanel through phpmyadmin. Next, open the wp_users table and find your username or email address. Click on Edit and look for the user_pass field.
Delete the existing value and enter your new password. Make sure to select MD5 as the input style, which is the encryption method that WordPress uses. Save your changes and try logging in again.
3) Blocked by Security Plugin
If you are using a security plugin like Limit Login Attempts Reloaded or Wordfence Security, these plugins have a feature to limit login attempts. This means if you enter the wrong password many times, the plugin will block you from the site for some time.
You have two options to log in back to your site. One is to wait for the security plugin to allow you to enter your login credentials again. The block is temporary and it will be lifted after some time.
But if you need to log in at the very moment because you have urgent work to do on your site or maybe you are working for a client site and you are near your deadline, you can get access back by disabling the plugin manually by cPanel or by FTP.
Access your file manager and go to your root folder of the site which is public_html. You will see all the files of your WordPress website. Go to your wp-content and open the plugins folder.
Locate the security plugin and rename it by adding “disabled” at the end of it and save it. This will disable the plugin. Now check your site again and if this was the cause, you will be able to log in to your WordPress dashboard successfully.
Also, once you are logged in, you can enable the plugin again by removing the “disabled” from its name.
If it works for you, then great. If not, follow the next method.
4) Restore Your Website from a Backup
If you made any recent changes on your site and you think these changes might be the reason you are not able to access the site and you are experiencing the login problem with your site, the best approach will be to restore a recent backup if you have one, either from the plugin or from the hosting provider (the hosting company backup will be best if you have ).
Most modern hosting providers backup your site daily which you can restore with a click. As I am using Hostinger, you can see the option in the Hostinger dashboard for restoring the backup of my site in one click in the image below:
So, restore the backup if you have one, and then check your site if it’s working. After the restore, it means the change you made on your site, either installing a new plugin, or theme or adding code to your WordPress core files, might be the reason you can’t access the wp-admin.
I know most of you guys will not have a backup but don’t worry. Be with me till the end. There are more methods I will be telling you and hopefully your can’t access wp-admin issue will be solved. It’s frustrating but what can we do other than troubleshooting? So, follow the next method.
5) Check DNS Settings
DNS stands for Domain Name System, which is a system that translates domain names (such as example.com) into IP addresses (such as 192.168.0.1) that computers can understand.
Sometimes, your DNS settings might be outdated, corrupted, or misconfigured, which can prevent you from accessing your wp-admin you will see a message like this “WordPress site can’t be reached” While accessing your site
Here are some steps you can try to fix your DNS settings and access your wp-admin again:
Clear your browser cache and cookies. This will ensure that you are not loading a cached version of your site that might have the wrong DNS information.
Flush your DNS cache. This will clear the local cache of DNS records that your computer stores. Depending on your operating system, you can use different commands to do this. For Windows, you can open the Command Prompt and type.
For Mac, you can open the Terminal and type.
sudo killall -HUP mDNSResponder
Also If you have recently registered a new domain or migrated your website to a new host, it can take some time for DNS changes to propagate. During this time, you might experience login issues.
Check your DNS records. You can use online tools such as DNS Checker or WhatsMyDNS to verify whether your domain name is correctly pointing to the desired IP address. If you find that it’s not pointing to the correct IP address, you might need to make adjustments to your DNS records with either your domain registrar or hosting provider.
In my case, since I’m using Hostinger as both my hosting and domain registrar, I can conveniently access and modify my DNS settings within my Hostinger account. You should have similar options in your own domain registrar or hosting control panel. Look for the DNS settings, and if necessary, update them to resolve the login issue.
Check your domain’s nameservers. If they don’t match your hosting provider’s nameservers, update them using the information available in your hosting account’s overview.
After making changes to your DNS settings, it’s crucial to be patient as you wait for DNS propagation to complete. Keep in mind that this process can take some time as DNS changes are propagated across the internet. Allow it some time to ensure the changes take effect.
6) You Change the WordPress URL
Another common reason you can’t access the wp-admin login page is that you might have used a plugin or manually changed your login URL for security reasons.
Now you are entering the wrong login URL while accessing your site wp-admin. To fix this issue, you can follow our guide on finding your wordpress login URL which will help you access your site.
You can also disable the plugin that changed your login URL by going to your WordPress files either from cPanel or from FTP.
Once you are in your public_html (root folder), go to wp-content > plugins and rename the plugin by adding “disabled” to its name. This will deactivate the plugin and your default login URL which is yourdomainname.com/wp-admin will work.
7) Switch to Default Theme and Disable All Themes
Sometimes the theme you are using is responsible for not accessing your site wp-admin dashboard and troubleshooting it is easy.
Go to your wordpress file as we did in the previous method and navigate to wp-content>Themes.
There you will see all your wordpress themes. If you know what theme you are using, find it and rename it by adding “disabled” to its name. This will deactivate it and activate another theme from the theme folder automatically.
If you are not sure what theme you are using, you can disable all of the themes by adding “disabled” to their names and leaving only the default theme, which is twenty-twenty-three. If you do not have this theme on your site, you can download it from Google and upload it to your theme folder.
This is a troubleshooting step that usually works if the theme is causing issues. If not, you can try the next method.
8) You’re seeing the white screen of death or 500 Internal Server Error
If your wp-admin not working and you are seeing a blank page or a white screen when you try to login to your site or maybe an error message saying 500 internal server error, this prevents you from accessing your WordPress dashboard. Don’t worry, this is a site-wide problem known as the white screen of death.
It is usually caused by a plugin conflict in your WordPress or maybe something went wrong with your .htaccess file or a wrong site URL configuration.
Let’s fix all of these issues one by one to make the site load correctly so you can access your WordPress dashboard.
First, let’s check the plugin conflict. Go to your WordPress file manager from cPanel as we have discussed in the earlier method and then go to your wp-content > Plugins, rename the plugin folder name, and add “disabled” at the end. This will disable all the plugins.
Now check the site. If the error is gone, then most probably one or more plugins are causing the conflict. If you are logged in successfully, then you can activate the plugins one by one and check your site. You will find the culprit plugin.
Something Wrong with .htaccess File:
If disabling plugins didn’t work for you, then check your .htaccess file in your root folder (public_html). Also if your wp-admin redirects to the homepage then this is also because of your .htaccess file and changing it to default will fix the issue.
The .htaccess file can sometimes become corrupted and misconfigured which you can troubleshoot by temporarily renaming it to “.htaccess_disabled”. This will disable it. Now check your site. If you access your site successfully, this means you have identified the problem.
I assume you have been successful in logging in to your dashboard after renaming the .htaccess file, so to create a new one just go to your WordPress settings > Permalinks and click on save.
This will automatically generate a new .htaccess file for you. You can delete the old corrupted one which you have renamed.
Your Site URL Is Wrong
The white screen of death and the internal server error are also caused by incorrect “WordPress Address” (URL) and “Site Address”.
If you have access to your WordPress dashboard, you can change them by going to WordPress Settings > General and checking both the fields which are the Site address and WordPress address. If they are identical, it means they are correct.
If you don’t have access to your WordPress admin dashboard, you can still update your WordPress address and site address by accessing your WordPress core files either from FTP or cPanel file manager.
Once you are in your “Public_html” which is the root folder of your WordPress, locate the wp-config.php file edit it, and add the following lines of code at the end of it:
define('WP_HOME', 'http://example.com'); define('WP_SITEURL', 'http://example.com');
But make sure to replace example.com with your own domain name.
This will surely fix your internal server error and white screen of death error and you will regain access to your site as well as to your WordPress dashboard.”
9) PHP Limit Is Too Low
If the PHP limit on your site is too low this is also one of the potential reasons you can’t access the wp-admin dashboard of your wordpress site and usually, it gives errors like maximum execution time exceeded which you can check our guide to fix the PHP memory limit.
PHP memory limit defines how much memory a PHP script can use on your server. If your site’s PHP memory limit is too low, it can lead to login problems, especially if your website uses resource-intensive plugins or themes
So to solve this issue follow the steps below:
Step 1: Identify the Current PHP Memory Limit
- Access your WordPress site’s root directory using an FTP client or your hosting control panel.
- Look for the
wp-config.phpfile, which is typically located in the root directory. Download a copy for backup.
wp-config.phpwith a text editor, and search for the following line of code by Pressing Ctrl + F and adding the code there:
The “xM” represents the current PHP memory limit in megabytes.
Note: If you can’t find the line of code in your wp-config file then add the above code at the end with your own PHP limit.
Step 2: Increase the PHP Memory Limit
If you have identified that your PHP memory limit is too low (commonly set to 32M or 64M etc), you can increase it to resolve the login issue. Follow these steps:
- Decide on an appropriate memory limit for your site. This can depend on your site’s size, complexity, and resource demands. A value of 128M or 256M is a good starting point for many websites.
- Edit the
wp-config.phpfile and locate the
define('WP_MEMORY_LIMIT', 'xM');line in the wp-config.php file you identified earlier.
- Change the value within the single quotes to your chosen memory limit. For example:
- Save the file and upload it back to your server if necessary.
Step 3: Test WP-Admin Access
After increasing the PHP memory limit, check if the access to your WP-Admin dashboard working. If the low PHP memory limit was the issue, you should be able to log in without any problems.
If you can’t log in after changing the PHP memory limit then follow the next method.
10) You Encounter a PHP Syntax Error
In the previous method, we increased the PHP memory limit to define how much memory a script can use to execute. But here we are discussing the syntax error that occurs while editing your PHP code on your WordPress site.
Remember if you recently made any code change in your functions.php file or added any new plugin or theme and after that, you are unable to login to your site. This means that the problem is caused by the custom PHP code you have added or the plugin PHP code syntax is incorrect.
Also, the PHP syntax error can be seen as a popup on your WordPress screen at the top or you might see a blank white page. These errors are sometimes critical and might prevent you from accessing your site’s backend (login screen).
The preview of the PHP syntax is shown below:
To fix this issue, go to your WordPress core file where you are adding custom code by using the file manager in the Cpanel.
The PHP code you will see will also give you the file name and the line of code where the issue is. The cause of the issue can vary but you should check for extra characters, unclosed brackets, etc.
If this does not work, don’t lose hope. Follow the next method as we are doing sequential troubleshooting and you will resolve the wp-admin not accessing issue by the end.
11) Problem with File Permissions
File permission determines who can access and modify the files and folders on your server. If the file permissions are set incorrectly on your server, this might be the reason why you are unable to access your site wp-admin.
To fix this issue, go to your file manager in your WordPress hosting and check your WordPress files and folder file permission by right-clicking on the file and folder and selecting file permission from the menu. Usually, the permission for the folder is set to 755 and for files, it is 644.
If you find out that the permission for your main WordPress folders like wp-admin, wp-content, and wp-includes is not set to the correct number which is 755, then change it to the correct permission.
Also, check the wp-config.php and wp-login.php file permission. It should be set to 644 because these files are responsible for logging into your site and for the overall functionality of your WordPress site.
Once you check the permission, try to log in to your site through wp-admin again. If it is not successful, follow the next method.
12) You Get a Database Connection Error
Sometimes WordPress loses its connection with the database which is rare but once the issue occurs you will be unable to access your site and you will see an error message that says “Error establishing database connection”.
The preview of the error is shown below:
You might think the issue is complex to fix as it involves a database but the problem is not that hard. You only have to check your wp-config.php file in your public_html folder and see if it matches the database details with your hosting database details. If they are not identical, then this is likely the cause of the issue.
You can find your database in your hosting overview panel and cross-check with your database detail in the wp-config.php file.
What you have to check are:
- Name of database
- Table Prefix
- Database username and password
- Host (usually localhost or sometimes IP address)
If you are unable to find your database account details, you can contact your hosting support team. They will surely help you find your database details.
If it’s correct, then you don’t need to change anything. If not, update the info in your wp-config file in the code that looks like this:
/** The name of the database for WordPress */ define( 'DB_NAME', 'database_name_here' ); /** MySQL database username */ define( 'DB_USER', 'username_here' ); /** MySQL database password */ define( 'DB_PASSWORD', 'password_here' ); /** MySQL hostname */ define( 'DB_HOST', 'localhost' );
13) Your Core WordPress Files Are Corrupted
The wp-login.php is the core file of WordPress that controls the WordPress login process. If there is some issue with this file, you will not be able to access your wp-admin.
Fixing this issue is really simple follow the steps below:
- Download the latest WordPress installation from wordpress.org and extract it on your computer.
- Locate the wp-login.php file in the extracted folder and upload it to your public_html folder where your current wp-login.php file is.
- Overwrite the existing file when prompted.
- You have updated your wp-login.php file to the latest version and there will be no issue with this file.
What to Do If You’re Still Can’t Access WP-Admin
If you are reading this, you have probably tried all the troubleshooting methods but still have issues logging in to your dashboard. The error might be beyond your control and related to your hosting environment. Everything might be working fine on your end, but you are still unable to access your WordPress dashboard.
After trying all the methods in this comprehensive guide to fix the wp-admin issues, the last resort is to ask for help from your hosting support team or from the WordPress support forum. There, many fellow WordPress users will surely help you out.
Also, popular forums platforms like StackExchange, StackOverflow, Quora, and Reddit are also good places to ask for help regarding your specific issue and hopefully, you will find your solution and will get access to your wordpress dashboard.
Hopefully, you will be able to solve the issue of not being able to access your wp-admin by following this comprehensive guide.
This guide covers all the possible reasons that can cause the issue, from internet connection troubleshooting to checking and fixing your wordpress core files. If you follow this guide in a sequential way, starting from the first method to the last, you will be able to access your wp-admin again.
The issue of not accessing your site wp-admin can have many causes, so it is important to follow the article from start to end.
But if you are still stuck and need guidance, I am here to help you out. Maybe your issue is unique in nature, so just tell me your issue via comment and I will assist you to solve it. Thank you for reading!