Sometimes I worry we spend so much time focusing on external sources that could potentially harm our sites that we forget that we too can cause problems for ourselves. Take, for instance, the WordPress login page.\r\n\r\nIt's such a simple thing, isn't it? Open your login page. Enter your user credentials. Gain entry into the backend of your WordPress site:\r\n\r\n<img class="aligncenter size-full wp-image-13227" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/WordPress-Dashboard.png" alt="WordPress Dashboard" width="900" height="398" \/>\r\n\r\nBut what happens if you don't see your dashboard or, worse, if you don't see the login page at all? Anything that keeps you from logging into WordPress and getting to your site is cause for concern, though some reasons for the lack of access are less serious than others.\r\n\r\nToday, I want to dig into what might cause WordPress login errors to occur. I'll give you some tips on how to spot the signs as well as how to go about fixing them ASAP.\r\n<h2>10 Common WordPress Login Errors and What to Do About Them<\/h2>\r\nOkay, so let's say your workday has started and it's time to make some headway on this website project you're working on. You go to the WordPress login page...\r\n\r\nAnd your password no longer works.\r\n\r\nOr you enter the password, but receive a message about cache or cookies.\r\n\r\nOr maybe you don't see the login page at all and are greeted by an error message or the white screen of death.\r\n\r\nUgh. Great. Now what?\r\n\r\nIt's time to troubleshoot the cause and put a fix in place. Let's start with some of the easier WordPress login errors to identify and go from there:\r\n<h3>1. A Lost or Forgotten Password<\/h3>\r\nWhile I don't think this is a problem that's likely to happen to a web developer or other WordPress professional who basically lives in the CMS 24\/7, this login error will at some point affect your clients. So, if you or someone you work with tries to log in but sees the error message below, you're likely looking at a lost or forgotten password.\r\n\r\n<img class="aligncenter size-full wp-image-13228" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/Lost-Password.png" alt="Lost Password" width="900" height="492" \/>\r\n\r\nThe WordPress Codex <a href="https:\/\/codex.wordpress.org\/Resetting_Your_Password" target="_blank" rel="noopener">provides a variety of ways<\/a> in which you can fix this WordPress login error. However, there are two ways in which I prefer to go about resetting user passwords:\r\n\r\nIf you still have access to WordPress as an administrator, do the following:\r\n<ul>\r\n \t<li>Log into WordPress.<\/li>\r\n \t<li>Go to the Users menu.<\/li>\r\n \t<li>Search for the user that has lost or forgotten his or her password.<\/li>\r\n \t<li>Scroll to the bottom of the page and locate the Account Management > New Password section.<\/li>\r\n \t<li>Click on Generate Password. You can either insert a custom password or let the system generate one for you.<\/li>\r\n \t<li>Update the user's profile and provide them with the new password.<\/li>\r\n<\/ul>\r\n<img class="aligncenter size-full wp-image-13229" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/Generate-Password.png" alt="Generate Password" width="900" height="545" \/>\r\n\r\nNow, if they are still unable to log in or you're the one who can't get in, there's another option you can try. For this one, you'll need access to the backend folders and files of your site. You can do this through phpMyAdmin.\r\n\r\nOnce you're inside, do the following:\r\n<ul>\r\n \t<li>Locate your WordPress site's database and expand it so you can see inside.<\/li>\r\n \t<li>Locate the <em>users<\/em> table and select it.<\/li>\r\n \t<li>Find the username that needs WordPress access restored and click the Edit button.<\/li>\r\n \t<li>Edit the value in the user_pass field of the table. Change the function to MD5 and insert the new password.<\/li>\r\n \t<li>Save the changes and send the new password to the user (if it's not for yourself).<\/li>\r\n<\/ul>\r\n<img class="aligncenter size-full wp-image-13230" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/User-Table.png" alt="User Table" width="900" height="671" \/>\r\n\r\nHopefully, that will fix the WordPress login error and get you back inside. In the future, I would suggest installing a password manager tool for your browser like <a href="https:\/\/www.lastpass.com\/" target="_blank" rel="noopener">LastPass<\/a>. This will ensure that you never get locked out of WordPress again due to a lost or forgotten password.\r\n<h3>2. Revoked Access<\/h3>\r\nLet's say you're seeing the same error message from above. However, you're positive that you didn't make any changes to the username or password. <em>And<\/em> when you try to access your control panel account to put the fix in place, you find that you no longer have access there either.\r\n\r\nIn that case, you may be dealing with a revoked access issue.\r\n\r\nThis could be the case if your client was either messing around in the Users portion of WordPress or if they decided that you no longer needed access.\r\n\r\nThe latter happened to me after wrapping work on a web development project. When the client came back a year later asking for additional services, I was unable to get back into WordPress because they had deleted my user account (which they were right to do). So, I got on a call with them and walked them through the setup of a new user in WordPress.\r\n\r\n<img class="aligncenter size-full wp-image-13231" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/Add-New-User.png" alt="Add New User" width="900" height="606" \/>\r\n\r\nSo long as they want you to have access, it's as simple a fix as that.\r\n<h3>3. Cookies Need Resetting<\/h3>\r\nThis WordPress login error actually has nothing to do with WordPress and everything to do with your browser settings. If you receive an error upon trying to log in that says something like "cookies are blocked", then the fix will be in your browser's settings.\r\n\r\nThe fix actually requires two steps. The first is to enable cookies if they aren't already. You'll find this in your browser's content settings:\r\n\r\n<img class="aligncenter size-full wp-image-13233" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/Chrome-Settings.png" alt="Chrome Settings" width="900" height="206" \/>\r\n\r\nThe next step is to clear your browsing data:\r\n\r\n<img class="aligncenter size-full wp-image-13234" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/Clear-Browsing-Data.png" alt="Clear Browsing Data" width="900" height="689" \/>\r\n\r\nOnce the cookies and cache are fully cleared, go ahead and log into WordPress.\r\n<h3>4. Domain Changed<\/h3>\r\nNext, let's take a look at the actual web address you're trying to access the WordPress login through. If you enter the address or open your bookmark, and it looks like there's nothing there anymore, you may have a problem with the domain name being changed.\r\n\r\nFor instance:\r\n<ul>\r\n \t<li>Did the site recently undergo a rebrand?<\/li>\r\n \t<li>Was an SSL certificate recently installed on the server?<\/li>\r\n \t<li>Was a Multisite network created and the network name or subsite address changed?<\/li>\r\n \t<li>Did you install a security plugin that enabled you to change the default wp-admin or wp-login address?<\/li>\r\n<\/ul>\r\nThink about the recent changes made to the site. If it's simply that you or your users weren't visiting the correct login address, that's an easy one to fix. Just make sure to update your bookmarks so you don't run into the same issue again.\r\n\r\nNow, if you're unaware of any domain name updates but still encounter this "page doesn't exist"-type of error, then it's time to look at the WordPress database to see if the URL somehow was reset.\r\n<ul>\r\n \t<li>Open phpMyAdmin.<\/li>\r\n \t<li>Locate the wp-options table in your site's database.<\/li>\r\n \t<li>Verify that the <em>siteurl<\/em> and <em>home<\/em> values match your domain name exactly. This also means including or excluding the "www" and using either "http" or "https".<\/li>\r\n \t<li>If these are incorrect, use the Edit function to fix them.<\/li>\r\n<\/ul>\r\nIf everything checks out, then you will need to update the wp-login.php file to force the update. You can do this in your control panel's file manager or FTP.\r\n\r\n<img class="aligncenter size-full wp-image-13235" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/wp-login-File.png" alt="wp-login File" width="900" height="313" \/>\r\n\r\nSelect Edit to open the wp-login.php file. WordPress then suggests adding the following lines to your file:\r\n\r\n<code>\/\/FIXME: do comment\/remove these hack lines. (once the database is updated)\r\nupdate_option('siteurl', 'http:\/\/your.domain.name\/the\/path' );\r\nupdate_option('home', 'http:\/\/your.domain.name\/the\/path' );<\/code>\r\n\r\nBe sure to update the values for <em>siteurl<\/em> and <em>home<\/em> to what the domain name needs to be. If this was the issue, you should now have restored access.\r\n<h3>5. Syntax Error<\/h3>\r\nWith this kind of login error, you're definitely going to know what caused it. Basically, if you make any edits to files on the backend of your site and then see the white screen of death when you attempt to log into WordPress, you've introduced a syntax error somewhere.\r\n\r\nTo fix this, you have two choices:\r\n<ol>\r\n \t<li>Return to the file you just edited, repair the incorrect code introduced into it, and save your changes.<\/li>\r\n \t<li>If you made extensive edits to the file and are unsure of how to get it back into safe territory, you will need to either put a fresh install of it on the server or roll your site back to the last saved backup.<\/li>\r\n<\/ol>\r\nIf you have encountered this error and had to go the unfortunate route of rolling your site back because you couldn't fix the file, I'd suggest always saving a copy of any file before you make edits to it. Even if it's code you've written 100 times (like something as simple as installing a Multisite), save the file. It will save you a lot of trouble in the long run.\r\n<h3>6. Corrupted wp-login.php File<\/h3>\r\nIf you've tried everything above and you're seeing an internal server error show up at the login screen, it's time narrow down which files on your server are messing with your ability to log in.\r\n\r\nWhile the wp-login.php file can help you gain access back into WordPress, it could be the source of the error in the first place, too. If the wp-login file is corrupted, switching it out for a fresh install will fix the problem.\r\n\r\n(Note: taking this file back to its original state won't hurt anything on your website. It will simply help you kick out any corruptions that may have shown up in it.)\r\n\r\nTo fix this, you will first need to get a clean and uncorrupted version of the wp-login.php. You can get this on <a href="https:\/\/wordpress.org\/" target="_blank" rel="noopener">the WordPress website<\/a>. Click the "Download WordPress" button in the top-right corner to get the latest version of the software. Then unzip the package and copy the wp-login.php file.\r\n\r\nFrom your file manager or FTP, go to your home directory and locate the wp-login.php file that currently exists. Delete it.\r\n\r\nYou can now upload the fresh install of wp-login.php to the server.\r\n<h3>7. Corrupted .htaccess File<\/h3>\r\nIf the wp-login fix didn't help, then you should l<a href="https:\/\/pagely.com\/blog\/wordpress-htaccess\/">ook to .htaccess next<\/a> as it can also become corrupted and create a WordPress login error.\r\n\r\nFor this one, make sure that hidden files are revealed in your file manager or FTP before proceeding as .htaccess is automatically hidden. Once you've found it, here is what you will do:\r\n<ul>\r\n \t<li>Create a copy of the .htaccess file that currently exists. (This is just in case the fix doesn't work and you want to restore the original settings.)<\/li>\r\n \t<li>Delete the .htaccess file.<\/li>\r\n \t<li>Try to log into WordPress.<\/li>\r\n \t<li>If you were successful in getting in, then you know where the corruption stemmed from.<\/li>\r\n \t<li>To create a new version of the .htaccess file, go to the Settings menu in WordPress and select Permalinks. Click the Save button at the bottom and your new .htaccess will appear on the server.<\/li>\r\n<\/ul>\r\n<h3>8. Insufficient Memory<\/h3>\r\nAn insufficient memory error will usually occur after you've tried installing something on your site that is just too large for your server to process. That being the case, you'll definitely know what caused this problem. The even better news is that you probably won't lose access completely to WordPress when it happens, too.\r\n\r\nFor instance, this happened to me recently when uploading some theme template files. I saw the insufficient memory warning and then was surprised when the WordPress login screen appeared. It took a few attempts and a clearing of my cache, but I was finally able to get back in again.\r\n\r\nIf this should happen to you, you could always just remove the offending files (and weight) from your server. But what happens when you want to install a new plugin or theme in the future? Are you going to go through the same thing again? Instead, you should adjust the memory limits on your server.\r\n\r\nYou can do this by adjusting the maximum limits set in your wp-config.php file:\r\n<ul>\r\n \t<li>From your file manager or FTP, open the wp-config file.<\/li>\r\n \t<li>Locate the line that defines the "wp_memory_limit".<\/li>\r\n \t<li>The default is usually 32M or 64M. You can increase this to 96M, 128M, or 256M based on what your server allows for.<\/li>\r\n \t<li>Save the changes.<\/li>\r\n<\/ul>\r\n<img class="aligncenter size-full wp-image-13236" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/wp-config-Edit.png" alt="wp-config Edit" width="900" height="234" \/>\r\n\r\nTry to log back into WordPress. If everything looks okay, go ahead and re-attempt to install whatever you were working on. The issue should be fixed.\r\n<h3>9. Plugin or Theme Conflict<\/h3>\r\nThis can be a tricky one to diagnose if you've automated your WordPress updates. That said, if you should run into an internal server error or the white screen of death and none of the above situations apply, then a new plugin or theme, <a href="https:\/\/pagely.com\/blog\/wordpress-plugin-best-practices\/">or an update<\/a>, might be the culprit.\r\n\r\nTo sort this one out, you're going to have to poke around inside the files in your wp-content folder.\r\n\r\n<img class="aligncenter size-full wp-image-13237" src="https:\/\/pagely.com\/wp-content\/uploads\/2018\/03\/wp-content-Folder.png" alt="wp-content Folder" width="900" height="278" \/>\r\n\r\nIf you did just recently install a new plugin or theme, this is going to be easy.\r\n<ul>\r\n \t<li>Navigate to the plugin or theme folder, locate the corresponding files, and delete them.<\/li>\r\n \t<li>Return to WordPress and try to log back in.<\/li>\r\n \t<li>If the login works, then the issue was caused by a conflict between whatever it was you were trying to install and something that already existed on your server.<\/li>\r\n<\/ul>\r\nIf you recently performed an update--to a plugin, theme, <em>or<\/em> the WordPress core--and you run into the same problem, the issue again is likely a conflict. However, to diagnose this one, you'll have to take a more systematic approach to it.\r\n\r\nFirst, rename the plugins folder under wp-content. This will deactivate all of the plugins on your site. Then try logging back into WordPress. If access is still blocked, return to the file manager. Revert the plugins folder back to the name "plugins".\r\n\r\nThen rename the themes folder. Again, try logging back into WordPress. Access should be restored.\r\n\r\nBasically, what you're doing here is trying to identify what was responsible for the conflict. When you rename the folder and break the connection to WordPress, this tells you where the problem child lives. Now, you have to figure out which one of them did it. This means going one-by-one through each.\r\n\r\n<b>If it's a plugin:<\/b>\r\nInside WordPress, go to the Plugins folder. All of your files should still be deactivated.\r\n\r\nTo identify the troublemaker, reactivate the first plugin in the list. If you still have access, then it's not that one. Deactivate it and then move on to the next one. When you lose access to WordPress, you've found the guilty party. Delete the plugin completely from the wp-content folder and log back in.\r\n\r\n<b>If it's a theme:<\/b>\r\nThe theme issue is an easy one to figure out since you can only have one theme on your site at a time.\r\n\r\nBack inside WordPress, go ahead and reactivate the theme. If access is denied, it looks like you're going to need to find a new theme (at least a temporary one until the web developer fixes the conflict between it and the core or plugin it doesn't work with).\r\n\r\n<b>If it's something else:<\/b>\r\nI also want to note here that WordPress themes and plugins aren't the only new additions to a site that could cause a conflict and get you locked out. Be cognizant of newly added tools like an SSL certificate or CDN. These can throw conflicts at the server level that deny you access to WordPress, too.\r\n<h3>10. Connectivity Lost<\/h3>\r\nIf you see an error that says something about there being an "error establishing a connection", the problem is either with your Internet connection or with your web server. If you've verified that the connection is fine on your end, you need to look into your web hosting account.\r\n\r\nVisit your web hosting provider's website to see if their network is experiencing any downtime that would account for this loss of access. If you can't find anything to confirm it, contact them immediately to figure out why the connection has been lost. It may be that your site was hacked and you've been blocked from accessing it all together.\r\n<h2>Wrapping Up<\/h2>\r\nWordPress login errors are no fun. If your client encounters one, you know it's going to send them into a full-on panic mode. And if you encounter one, well, it's going to require you to take time out of your jam-packed schedule to fix it. So, here is what I suggest:\r\n\r\nTo start, always generate regular backups of your site. If something should irrevocably sever your connection to the site or damage your files, you need that backup on hand to get back online right away.\r\n\r\nAlso, always remain cognizant of what's happening with your site. The more you know about what users are doing, which files are being updated, and so on, the more easily you'll be able to diagnose WordPress login errors.\r\n\r\nIf all else fails, reach out to <a href="https:\/\/pagely.com\/" target="_blank" rel="noopener">your managed WordPress host<\/a> for help. There are just some times when, no matter what you try, sometimes you need your hosting provider to take a look behind your site to figure out what's going on.