You try to access your WordPress Login account, but the login page just keeps refreshing? Or you see error messages instead of your dashboard?
This issue is not uncommon. Since you can’t do much to manage your WordPress site without being logged in as its admin, we want to get things back to working as they should.
The first thing to do is to identify the kind of problem you’re facing. The faces of this error are multiple. In most cases, knowing the reason helps select the suitable method to implement. We’ll outline the main types of the problem and provide the solutions depending on what you see instead of your dashboard after the login.
One of the potential reasons you’re deprived of access to your admin account is that WordPress doesn’t recognize your credentials. This often happens as a result of a hacker’s attack on your website. However, the mere human factor is responsible for errors even more often.
To rule out the typos and spelling mistakes, verify you’ve typed in the correct credentials. If that was not the reason, or you can’t recall or find your login and password, then you want to restore your WordPress login data from the backend.
If you’ve lost or forgotten your password, first try using the built-in recovery feature. Click on Lost your password? on the login screen and you will be prompted to enter your email address. WordPress will send you a link via email which you can use to create a new password.
If for some reason, you can’t use this method, there are two other tricks you can try.
First, if you’ve used multiple browsers or devices to log into WordPress, check to see if any of those browsers or devices are still logged in. Then access the admin panel and change your password.
If that doesn’t work, your next best option is to update your password directly in the WordPress database. If your site is hosted on a Linux server, you will usually have access to phpMyAdmin. However, before you edit your WordPress database, create a complete backup. Then, proceed on to the following steps:
wp_users
table.user_login
column and select Edit next to that row.user_pass
field and type a new plain text password into the Value field, replacing the existing symbols and characters.At this point, you should be able to login using the new password you just assigned to your WordPress username with phpMyAdmin. However, if you’re still locked out and unable to recover your password, there are several additional options you can try.
The login to your WordPress account was performed successfully, but the account only shows the most general, user-side information. If you lost your admin privileges, most likely, someone has gained them by hacking your site. Even though WordPress is a highly secure platform, you can find some plugins and themes with vulnerabilities, and hackers grow more and more inventive.
We recommend you keep your site up to date in all its aspects, from plugins to the PHP version, to prevent this in the future. If this is what you’ve encountered now, you can create a new account.
In order to work, your WordPress site relies on lots of files that it keeps in a database. It runs SQL queries to gain the information necessary to process the request and load a page or post. Sometimes your website can’t access this database; it can be due to the wrong database-related credentials or some server-side problems. If the latter is the case, contact your hosting provider if they can fix it.
Another reason behind this error can be a corrupted database structure. Some poorly coded themes or plugins can impact the database, causing tables to disappear. Try to install only the trustworthy ones to avoid any conflicts. A helpful practice to keep your database healthy is to work on optimizing MySQL for WordPress regularly.
And, of course, as the name of the error implies, it could be that WordPress just cannot reach the database because of the wrong database-related credentials. Learn how to change them in a few simple steps.
If you see a blank screen when logging in to your account, it’s possibly the result of errors caused by your WordPress theme or plugins. Some of the rogue ones can do severe damage to your website and pose security threats (this is the right time to once again remind of the importance of choosing well-known and safe-to-use plugins and themes). Down below, we explain how to deactivate them when you’re outside your admin area, and regular login is impossible.
PHP is responsible for the structure of every WordPress site. That being said, it is no wonder even the most innocent-looking mistake in PHP leads to failures in the entire website’s operation. This is why we insist you should try to avoid editing code unless you’re a professional developer and are absolutely confident in what will happen after every step you take.
Often, the errors occur after manual editing of the theme files like functions.php. If you’ve recently made any modifications to the WordPress files, you want to consider them as potential culprits first. Learn how to monitor PHP errors on WordPress to avoid this type of scenario.
The condition that particularly often causes login problems is memory limit exhaustion. You can extend the limit in the files from your WordPress directory: in some cases, it helps with the login.
Sometimes you get the widely known internal server error, AKA error 500. Though you may find it worrisome, there are several solutions you can employ to fix it. And never worry: in any case, you can call on us to help you with any WordPress-related issue.
The error 404 is another type of login error you may get. As the message states, your WordPress site or its URL wasn’t found when you attempted to log in. Below, we’ll show you what to do to fix it.
Cookies are small files located in browser directories that store information about a user’s interaction with specific websites. WordPress requires the use of cookies during the login process. If cookies are not enabled, WordPress login can’t occur.
The browser cache refers to the temporary files stored on your web browser when you access a web page. If your cache is not updating properly you may be viewing older versions of some of the files that support WordPress.
Luckily, cache and cookie issues are usually easily fixed. First, check that cookies are enabled and then clear both your browser cache and cookies.
While WordPress is an incredibly powerful platform, it does come with its share of occasional frustrations. One potential source of grievance amongst WordPress users is the inability to log into the WordPress admin area. There are many reasons why WordPress login issues might arise, some more common than others.
This article will highlight some of the most commonly experienced login issues, explain why they might occur, and offer appropriate solutions.
This is an obvious one, of course, but nonetheless an important problem. If you change your password regularly to help with site security, it’s very easy to forget or lose track of your current password. While WordPress has a built-in feature to help you reset your password, there are a number of factors that can derail that process. As a result, there are actually quite a few different potential solutions that you may have to run through.
If you’ve lost or forgotten your password, first try using the built-in recovery feature. Click on Lost your password? on the login screen and you will be prompted to enter your email address. WordPress will send you a link via email which you can use to create a new password.
If for some reason, you can’t use this method, there are two other tricks you can try.
First, if you’ve used multiple browsers or devices to log into WordPress, check to see if any of those browsers or devices are still logged in. Then access the admin panel and change your password.
If that doesn’t work, your next best option is to update your password directly in the WordPress database. If your site is hosted on a Linux server, you will usually have access to phpMyAdmin. However, before you edit your WordPress database, create a complete backup. Then, proceed on to the following steps:
wp_users
table.user_login
column and select Edit next to that row.user_pass
field and type a new plain text password into the Value field, replacing the existing symbols and characters.At this point, you should be able to login using the new password you just assigned to your WordPress username with phpMyAdmin. However, if you’re still locked out and unable to recover your password, there are several additional options you can try.
Cookies are small files located in browser directories that store information about a user’s interaction with specific websites. WordPress requires the use of cookies during the login process. If cookies are not enabled, WordPress login can’t occur.
The browser cache refers to the temporary files stored on your web browser when you access a web page. If your cache is not updating properly you may be viewing older versions of some of the files that support WordPress.
Luckily, cache and cookie issues are usually easily fixed. First, check that cookies are enabled and then clear both your browser cache and cookies.
It’s possible for a plugin to interfere with the login process. A plugin may not have been updated properly, or there could be a conflict between two or more of your plugins.
The first thing you need to do is confirm that the issue is being caused by a plugin. You can do this by deactivating all of your plugins or by temporarily renaming the plugins folder.
If you have access to your admin panel, simply go to the Plugins menu and deactivate all plugins. Make sure to back up your site first. Select all of the plugins, go to Bulk Actions and select Deactivate.
If you don’t have access to the admin panel you can rename the plugins folder. Use a File Transfer Protocol (FTP) client, locate the wp-content/plugins folder, and rename it temporarily.
WordPress won’t recognize the folder and will deactivate all plugins.
Once you have deactivated all plugins, try logging in. If you’re now able to log in, you’ve confirmed that a plugin is causing the issue. If so, you’ll need to troubleshoot to discover which plugin is causing the issue. You can take a look at the “Check Your Plugins” section in this blog post for more detailed instructions.
Theme issues can cause login problems, especially if your theme includes a custom login page. This issue is most likely to rear its head when a problematic theme update is installed, or when the WordPress core is updated producing a theme incompatibility.
Determine if a theme issue is causing your login woes by reverting back to the default theme. To do this, temporarily rename your active theme’s directory so that WordPress doesn’t recognize it.
You can do this by accessing the wp-content/themes folder using an FTP client, finding the active theme’s folder, and renaming it. This will force WordPress to revert to the default theme.
Now, try logging in to confirm that the theme is the issue. Also, take a look at the “Check Your Theme” section of this post for more details.
If the WordPress login file, wp-login.php, is corrupted, deleted, or misplaced, you won’t be able to access the login screen at all.
To check if this is the problem (and to simultaneously resolve it) you will need to replace the file with a new one.
010205 | // Delete this line [ 'user_login' ]; // Replace it with this line ->user_login; |
If the login file was the issue, you should now be good to go.
The WordPress address URL identifies the location where WordPress is installed while the site address URL identifies where your website should resolve. If either is wrong, it can cause all sorts of issues, including the inability to access the admin area to correct the mistake.
This can happen if you have recently migrated WordPress, altered the location of the WordPress core by moving WordPress to a subdirectory, or it can simply be due to an errant keystroke while working with your WordPress database.
There are lots of potential solutions when it comes to fixing the WordPress address and site address URLs. However, there is a simple (albeit temporary) trick to enable you to confirm that you do in fact have a URL issue on your hands.
After backing up your site, access the wp-config.php file with an FTP client and add the following code:
0102 | define( 'WP_HOME' , 'http://example.com' ); define( 'WP_SITEURL' , 'http://example.com' ); |
Making sure to use the WordPress address URL for WP_HOME
and the site address URL for WP_SITEURL
. By default, both addresses will be the same. However, if you’ve given WordPress it’s own directory, the WordPress address URL will include the directory in which you’ve installed WordPress.
Save the updated wp-config.php file and upload the modified file to the server using your FTP client. If you can now successfully log in, then you’ve identified the problem.
However, this is a temporary fix so you should delete the added code and update the WP_HOME
and WP_SITEURL
values in your site’s database using another method to correct the issue permanently.
When performing any fixes, stay on the safe side and protect your website from any unwanted outcome. Remember that things can potentially go wrong even if you think you’ve done everything right. Here’s a checklist of what you need to do now and should always do before making changes to your website.
And on with the troubleshooting!
We’ve mentioned FTP not in vain: you’ll need it for all the steps below. One thing you can do without it is to check the permissions for the cookies.
Cookies are one of the most common causes of WordPress admin login problems. But WordPress requires them to work; so, you must have them enabled in your browser.
Start with deleting the browsing history. Make sure you delete the data for the All time period. You’ll also see the list of data you can clear along with the browsing history. Check cache and cookies to make everything load anew. The hotkey combination for it in the most popular browsers would be Ctrl (or Command) + Shift + Delete. After that, make sure cookies are enabled and proceed to the login page to try to enter again.
If you get the EEDC, you can fix it by resetting the password for the database. From the backend, the way to do it is to change it in the wp-config file.
Log in to your site using FTP. Look for wp-config.php in your WordPress root directory, download and open it.
In this file, find the lines that read:
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
Below you’ll see your WordPress database credentials.
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' );
Note that we put the placeholders (in red) for the actual sensitive data you’ll be editing. Yours will look different.
Check if the data you see matches what you’ve set as credentials when creating your site. If the ones in the wp-config are incorrect, change them and check if login is performed correctly now.
WordPress offers multiple ways of resetting login and password for your account. It is helpful to start with the options that are easier to perform, like restoring the data with your email: it is still possible even if you were hacked. If this strategy doesn’t show any success, try the backend access.
WordPress database, among other things, stores your user ID and password. To retrieve it from there, you will need to access your database using phpMyAdmin.
Find your WordPress site database. There, find the users
table and click on it. It is usually named wp-users
because wp_
is the default WordPress prefix. It could be different if you specified that during WordPress installation.
You can edit the password under the Edittab. It would offer you several input fields; you’re looking for user_pass
. Provide the new password in the box and select the MD5 function in the menu left from it. Don’t forget to click Gowhen you’re done.
Try to log in to your WordPress admin area again using the new password.
This is one more way to reset your password. With FTP, find your function.php file of the active theme (located in the corresponding theme folder in wp-content > themes). Open the file and add this after the first <?php
tag:
wp_set_password( 'password', X );
Here, X is where you put your user ID from the wp_users
table (the paragraph above describes where it resides).
WP-CLI is a helpful tool that lets you manage essential WordPress site information without using an internet browser. If you use this command line interface for WordPress, you can use it to fix the login error, too.
You will need to change the password with it. Run the command:
$ wp user list
It will display the list of all users registered on this website. Find your admin account ID – copy or memorize it for the following step.
To update the password for the account you selected, you need to paste the following line:
$ wp user update X --user_pass=Y
Of course, you need to set your data in the command: put your ID for the X and the new password for the Y. By executing this command, WP-CLI will force your password to change. When you’re finished, go to the login page again and repeat the attempt with the password you’ve just set.
Issues with this file can also interfere with your logging in. If there’s anything wrong with it (or you’re short of it), you need to re-upload this file.
First of all, delete the one you have from the WordPress root directory. Then, get a new file by downloading the latest version of WordPress. Upload the new login file to your root directory and open it to edit. The modification will be tiny and almost effortless: find the line that says
Click Saveand check if you can log in now.
If you’re logged in but incapable of managing anything, it means that someone has gained unauthorized access to your site and stole your privileges.
However, you can still create a new account using phpMyAdmin. Find the wp-users
table (or any table that says _users
) – here’s where you can find it.
Go to the Inserttab. Fill in the boxes named user_login
, user_pass
(for this one, you’ll also need to select MD5 in the dropdown menu) and user_email
with your data. Put the period for which the user will be registered in user_registered
, and set the user_status
to 0. Click Goto apply the changes. Copy your new ID (you can now see it in the users
table).
Open the usermeta
table.
Go to the Inserttab. Fill in your user ID from the previous step, paste wp_capabilities
in the meta_key
box and set the meta_value
to be this:
a:1:{s:13:'administrator';s:1:'1';}
Leave other boxes empty. Click Go, and you’re all set. Now you have a new admin account; use the credentials you’ve just created to access your dashboard.
If you get a blank screen after the login page, the first thing you should try to do is to disable your plugins and the active theme. “But how do I do that if I have no access to my admin dashboard?” you may wonder. Here’s a trick: you can just rename the corresponding files in your WordPress folders.
Access your WordPress directory using FTP. Find the wp-content folder: both theme and plugins are located there.
Then, rename the themes folder to make the website switch to a default theme, and do the same for the plugins folder to disable all plugins you have installed.
When your website’s configurations have a memory limit set too narrow, it can quickly get exhausted. It may lead to various abnormal results, one of which is admin login attempt failures. You can try to use the following trick, but note that it doesn’t always work (depending on the hosting you have)
Open the wp-config.php file to edit it and, above the line that says “That’s all, stop editing! Happy blogging”, insert this:
define('WP_MEMORY_LIMIT', '256M'))
See if you can access your account now.
Before deleting this file, you can troubleshoot to see if it actually is responsible for your login problem. Locate it in the WordPress root directory and rename it so that WordPress can’t find it.
If it helps and this login attempt was successful, then you can delete it. In this case, you can create the new one from your dashboard: Go to Settings > Permalinks and click Save (yes, you don’t even have to change anything, your site will generate the new one).
If deleting the .htaccess wasn’t particularly fruitful, you can try to re-upload the wp-admin.php file. Likewise, download the new one from the most recent WordPress files and upload it to the root directory.
The wp-config.php file contains a lot of fundamental information about your WordPress site. Along with other things, you can use it to check if WordPress links to the correct URL even without accessing your admin area.
With your FTP client, find and open the config file. Paste this just before the line that says “That’s all, stop editing! Happy blogging”:
define('WP_HOME','https://www.yourwebsite.com');
define('WP_SITEURL','https://www.yourwebsite.com');
Substitute the URL in red with your URL. This should fix the login error if you had the wrong URL in your WordPress admin area for some reason.
Hopefully, these solutions helped you restore access to your admin account. If you frequently encounter login problems or other issues with your WordPress site, consider seeking professional advice and setting up a maintenance plan.