Would you like to know how you can resolve the problem with logging in to WordPress Admin? You may find it incredibly frustrating if locked out of your WordPress dashboard.
Most of the time, the “can’t login to WordPress admin” problem is merely a temporary one; once you identify the underlying issue, you can access your WordPress dashboard quickly and without any loss of content.
This article aims to help you determine why you cannot login to WordPress admin and how to resolve the issue. To accomplish this goal, we will list several potential problems and solutions for each issue.
Reasons Why You Can’t Access WP-Admin Page
These are some reasons why the WordPress admin can’t access the wp-admin page:
- The login credentials you entered are incorrect: People often forget their passwords for a variety of reasons. If you experience this type of issue, you should first verify that you have used the correct password.
- A security plugin on your WordPress site is blocking you: It is possible that, in some cases, the security plugin on your WordPress website may malfunction and lock you out of the WordPress admin area.
- You have changed your default login URL: The default URL of the WordPress login page should be changed as a matter of good practice. Your website will be a bit more secure as a result. However, if you forget the URL, it can have a negative effect.
- The memory limit of your WordPress site is insufficient: Your WordPress hosting may run out of memory if your website receives excellent traffic. Fortunately, this can be resolved quickly.
- There is a problem with your WordPress website: Locking yourself out of your WordPress administration page may sometimes result from a more significant problem, such as a white screen of death, internal server error, etc.
- A problem exists with the .htaccess file: Your WordPress website has all its essential functions controlled by the .htaccess file. If it is corrupted, the website will not function.
- The URL of the website is incorrect: The site URL is used by WordPress to determine what your actual URL should be. It is possible that you unable to login to the WordPress admin page if it is incorrect, as you will be redirected to a different URL instead.
- Permissions are incorrect for the file: The admin dashboard can become locked if the file permissions for the wp-login.php and wp-admin folders are incorrect.
- There is a problem with the core files of WordPress: There is a minimal chance that this will occur, but it can. If there is a problem with your WordPress core files, you will need to replace them with new files.
The following section will introduce some methods to resolve this problem.
Method 1: Delete Cache and Cookies
The easiest way to resolve the can’t access WordPress admin issue is to delete your cache and cookies. Cookie files are small data sent by websites and stored on the user’s computer by a web browser.
If you would like to disable this option, you can do so through your browser settings. Do not forget, however, that the WordPress login page requires these cookies. You may already know that every login page uses your browser’s cache.
By clearing your browser’s cache and cookies and restarting your browser, you may be able to gain access to your WordPress dashboard again.
In Chrome, you can delete cookies and cache by following these steps:
- Click on the three dots in the upper right corner of your browser.
- Go to the More tools option, then click on the Clear browsing data.
- Select All time.
- Check all the Boxes under Basic.
- Click on the Clear data button.
Method 2: Reset Your Password Using WordPress
In the event that your admin credentials are incorrect and you are not able to login into WordPress admin, you should first attempt to recover them using WordPress’s password recovery functionality.
Your WordPress login page should include a “Lost your password?” option. Click on this option to go through resetting your password.
If this feature is successful, you should receive an email that allows you to reset your password and log in. You do not need to worry if the password reset function does not work.
Your password can also be reset manually through your hosting account; it will require a few additional steps.
It is possible to change your password by editing your site’s database with phpMyAdmin or creating a new WordPress admin user by editing the database.
Method 3: Check Your Security Plugin
If you are using a WordPress security plugin, you might be unintentionally blocking your own site, and your wp-admin is not working.
Many WordPress security plugins can restrict login attempts by temporarily banning you if you enter an incorrect username or password on more than one occasion.
There are two options available to you in this case:
- It is usually only a matter of time before you will be able to try again after you have been blocked, so you can wait.
- The security plugin can be manually deactivated so you are able to log in immediately.
Is there any way to deactivate your security plugin if you are unable to access the WordPress dashboard?
Yes, you can do this by utilizing FTP or the cPanel File Manager if your host provides these services.
Follow these steps to do this:
- Go to your site’s server.
- Go to File manager, then /wp-content/plugins and select the folder related to your security plugin.
For example, in the following image, you can see the limit-login-attempts-reloaded plugin:
- Rename the folder and append -disabled.
Once you have done this, the plugin will automatically be disabled, and you should be able to log back into your WordPress dashboard.
Once you’ve logged in to your WordPress dashboard, you can go through this path, rename the folder again, and remove the -disabled part. Then, you’ll be able to activate your security plugin.
Method 4: Change the Admin Password via phpMyAdmin
Security reasons encourage users to change their passwords frequently, resulting in them forgetting their previous passwords.
If you forget your password and cannot log in to WordPress admin via the login page, click “Forgot your password?”
You will receive an email with instructions on changing your password from WordPress. But what if you are unable to access your email account?
There is, fortunately, a solution to this problem. Your cPanel account provides access to phpMyAdmin, through which you can change your password.
You can accomplish this by following the steps below:
- Go to your cPanel.
- In the database section, look for “phpMyAdmin”
- Once a page opens on top bar click on “Database” so you can view every available database.
- Select your WordPress database.
- Look for _users in WordPress sites this table is called wp_users, then click on edit.
- In user_pass, enter your password in “value” section.
- Make sure you change “Function” to “MD5”
- When you are finished, click on Go in order to save your changes.
Now that you have created your new username and password, you can log into WordPress.
Method 5: Disable WordPress Plugins via FTP
If you can’t access the WordPress dashboard, consider that plugins occasionally interfere with the login process. You may experience this problem if your plugins are not synced.
You must disable all of your plugins in order to resolve this issue. When you cannot access your WordPress dashboard, how can you accomplish this?
Follow these steps to do this:
- Go to your FTP account and disable plugins through the host.
- Locate your WordPress files and go to wp-content/plugins.
- Change the folder’s name from plugins to something else.
In this case, you can rename the folder to anything you wish, for example plugins-disabled, which will disable your plugins. Try logging into your WordPress dashboard once this has been completed.
Hopefully, this will resolve the issue, and if it does, it means that one of your plugins is interfering with your login process.
Method 6: Disable WordPress Theme via FTP
In the same manner as plugins, themes are also capable of interfering with the login process. Usually, this occurs when one of your themes is incompatible with a certain version of WordPress.
You will need to disable your theme in order to resolve this issue. Follow these steps to do this:
- Use FTP to enter your root directory.
- Go to wp-content/themes and simply rename “themes”. This disables the theme that you have selected. Therefore, WordPress will not be able to locate the folder and the default theme will be activated as a result.
- Try logging into the WordPress dashboard once you have completed the process.
In addition, if you are currently using the default theme, you also should follow the steps listed above.
The first thing you should do once you have gained access to your dashboard is to update your theme. There are times when even the default theme can cause problems when logging in.
Method 7: Re-upload and Fix the wp-login.php File
You can’t login to the WordPress dashboard if wp-login.php has been moved or deleted. It is necessary to re-upload the file in order to resolve this issue.
Whenever you make any changes to your WordPress site, it is recommended that you make a backup first.
Follow these steps to solve the problem:
- Go to your hosting and find the folder you have installed your WordPress and look for wp-login.php
- Download the latest version of WordPress and look for the wp-login.php file.
- Place the new wp-login.php file in your WordPress directory.
- Open wp-login.php and look search for redefining user_login
- Here is the code that should be copied and pasted right after the PHP code. You have find the first code and replace it with the secound.
// Delete this line
$user_login = $user_data["user_login"];
Replace the code with the following code.
// Replace it with this line
$user_login = $user_data->user_login;
Save your changes and try logging in to your WordPress dashboard again.
Method 8: Generate a New .htaccess File
There are times when a single line in the .htaccess file can cause your WordPress login page to break. In the event of a broken file, this may lead to a number of issues, such as login page refreshing error.
Follow these steps to resolve this issue:
- Go to your hosting root.
- Create a backup of your .htaccess file.
- Delete .htaccess from your host/directory.
- Try logging into your WordPress dashboard after you have deleted the file.
- Create a new .htaccess file ig the login process was successful.
Also follow these steps to create a new .htaccess file:
- Go to your WordPress dashboard.
- Go to settings then permalinks and click save to generate new .htaccess file.
Method 9: Increase Memory Limit
Suppose your WordPress website runs out of PHP memory. In that case, this can cause problems with different parts of your site and prevent you from accessing your WordPress administration area.
There is also the possibility of this error coming and going, which can make diagnosing it more difficult.
If your site’s memory is maxed out, you may be unable to access the WordPress admin. If your memory usage is low, however, you may not encounter any problems.
To resolve this issue, you might ask your hosting provider if they can increase the PHP memory limit for you. Other methods of increasing the WordPress memory limit may also be available.
You can also try to increase the PHP max input vars to fix the issue.
Method 10: Correct your site URL
The URL you configure for your site determines what WordPress believes to be the correct URL for your site.
You will not be able to log in if the URL of your site is incorrect since WordPress tries to redirect you to the incorrect URL when you attempt to access the WordPress login page when the URL is wrong.
Follow these steps to fix the problem:
- Connect to your server via FTP or cPanel File Manager.
- Edit the wp-config.php file and add the following lines above the /* That’s all, stop editing! Happy publishing. */ line:
- Replace https://yoursite.com with your WordPress website’s actual URL.
You must be aware that once this code is added to your wp-config.php file, you will no longer be able to modify the URL of your site from the WordPress dashboard.
Method 11: Check File Permissions
There is also a less common problem related to the permissions on your server’s files. Suppose you do not have the correct file permissions for the wp-login.php file and the wp-admin folder. In that case, you will not be able to access the WordPress administrator dashboard.
Except for the wp-config.php file, all WordPress files should be 664, and all folders should be 775, generally.
Follow these steps to check and change file permissions:
- Connect to your server via FTP.
- Make sure that wp-login.php is set to 664.
- Make sure that the wp-admin folder is set to 775.
Method 12: Restore Your Backup
You may have taken a backup through your web hosting service or with the help of a plugin. Restoring your backup is recommended if you have one.
The result of this action will be the removal of any recent errors that have occurred on your website.
If you restore a backup, you can access your WordPress admin page and log in as usual.
The error should still be troubleshot to determine its root cause to ensure it is permanently fixed.
The purpose of this article was to assist you in determining why you can’t login to the WordPress administration dashboard and how to resolve the issue using various methods.
Thank you for reading this article, and we hope that it has been helpful to you in resolving this issue.