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” issue is just temporary; if you find the underlying cause, you will be able to access your WordPress dashboard fast and without losing any material.
In this article, i will explain why you can't log in to WordPress admin and how to fix it. To achieve this goal, we will identify various potential challenges as well as remedies for each one.
Reasons Why You Can't Access WP-Admin Page
Here are some of the reasons why the WordPress administrator cannot 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: It is best practice to alter the default URL of the WordPress login page. As a result, your website will be a little more secure. However, forgetting the URL can have a negative impact.
- Your WordPress site's memory limit is insufficient: If your website receives a lot of traffic, your WordPress hosting may run out of memory. Fortunately, this is a simple fix.
- There is an issue with your WordPress website: Locking yourself out of your WordPress administration page may occasionally result from a more severe problem, such as a white screen of death, an internal server fault, or other such occurrences.
- 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 website's URL is incorrect: WordPress uses the site URL to determine what your actual URL should be. If the URL is incorrect, you may be unable to login to the WordPress admin page because you will be forwarded to a different URL instead.
- The file permissions are incorrect: If the file permissions for the wp-login.php and wp-admin directories are improper, the admin dashboard may become locked.
- There is an issue with WordPress' core files: This has a low probability of happening, but it is possible. If you have a problem with your WordPress core files, you will need to change them.
8 Methods To Fix WP-Admin Not Working and Can't Login to WordPress
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.
To disable this option, go to your browser's settings and do so. Keep in mind, however, that the WordPress login page requires these cookies. Every login page, as you may be aware, takes use of your browser's cache.
You may be able to regain access to your WordPress dashboard by deleting your browser's cache and cookies and restarting your browser.
In Chrome, you can delete cookies and cache by following these steps:
Step 1: Click on the three dots in the upper right corner of your browser.
Step 2: Go to the More tools option, then click on the Clear browsing data.
Step 3: Select All time.
Step 4: Check all the Boxes under Basic.
Step 5: Click on the Clear data button.
Method 2: Reset Your Password Using WordPress
If your admin credentials are incorrect and you cannot access WordPress admin, you should try to recover them using WordPress's password recovery capability.
A “Lost your password?” link should be available on your WordPress login page. To proceed with resetting your password, select this option.
If your email address is valid, you will receive an email with instructions on how to reset your password and log in. You should not be concerned if the password reset feature fails.
Your password can also be reset manually through your hosting account; however, this will necessitate a few extra steps.
You can change your password by editing your site's database with phpMyAdmin or by creating a new WordPress admin user in the database.
Method 3: Check Your Security Plugin
If you use a WordPress security plugin, you may be inadvertently 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:
- After being blocked, it is usually only a matter of time before you can try again, so you can wait.The security plugin can be manually deactivated so you are able to log in immediately.
- The security plugin can be deactivated manually so that you can log in immediately.
Is it possible to deactivate your security plugin if you can't 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:
Step 1: Go to your site’s server.
Step 2: 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:
Step 3: Rename the folder and append -disabled.
After you've done this, the plugin will be disabled automatically, 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
Users are encouraged to change their passwords frequently for security reasons, which causes them to forget their previous passwords.
If you have forgotten your password and are unable to log in to WordPress admin through 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:
Step 1: Go to your cPanel.
Step 2: In the database section, look for “phpMyAdmin”
Step 3: Once a page opens on top bar, click on “Database” so you can view every available database.
Step 4: Select your WordPress database.
Step 5: Look for _users in WordPress sites. This table is called wp_users, then click on edit.
Step 6: In user_pass, enter your password in “value” section.
Step 7: Make sure you change “Function” to “MD5”
Step 8: When you are finished, click on Go in order to save your changes.
You can now access WordPress after creating a new username and password.
Method 5: Disable WordPress Plugins via FTP
If you are unable to access the WordPress dashboard, keep in mind that plugins can occasionally interfere with the login process. If your plugins are not synced, you may encounter this issue.
You must disable all of your plugins to resolve this issue. How can you accomplish this when you cannot access your WordPress dashboard?
Follow these steps to do this:
Step 1: Go to your FTP account and disable plugins through the host.
Step 2: Locate your WordPress files and go to wp-content/plugins.
Step 3: Change the folder's name from plugins to something else.
To disable your plugins, rename the folder to whatever you desire, such as plugins-disabled. After that, try logging into your WordPress dashboard.
This should resolve the issue; if it does, it means that one of your plugins is interfering with your login process.
Method 6: Disable WordPress Theme via FTP
Themes, like plugins, can interfere with the login process. This usually happens when one of your themes is incompatible with a particular version of WordPress.
You will need to disable your theme in order to resolve this issue. Follow these steps to do this:
Step 1: Use FTP to enter your root directory.
Step 2: Simply rename “themes” under “wp-content”. This disables the theme you've chosen. As a result, WordPress will be unable to locate the folder, and the default theme will be activated.
Step 3: Try logging into the WordPress dashboard once you have completed the process.
If you are currently using the default theme, you should also follow the instructions outlined above.
Once you've gotten access to your dashboard, the first thing you should do is change your theme. Even the default theme can cause issues while signing in at times.
Method 7: Re-upload and Fix the wp-login.php File
If wp-login.php has been moved or destroyed, you will be unable to access the WordPress dashboard. Re-uploading the file is required 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:
Step 1: Go to your hosting and find the folder you have installed your WordPress and look for wp-login.php
Step 2: Download the latest version of WordPress and look for the wp-login.php file.
Step 3: Place the new wp-login.php file in your WordPress directory.
Step 4: Open wp-login.php and look search for redefining user_login
Step 5: The following code should be copied and inserted immediately after the PHP code. You must locate the first code and substitute the second.
// 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;
Step 6: Save your changes and try logging in to your WordPress dashboard again.
Method 8: Generate a New .htaccess File
A single line in the.htaccess file might sometimes cause your WordPress login page to malfunction. A broken file can cause a variety of problems, including login page refreshing errors.
Follow these steps to resolve this issue:
Step 1: Go to your hosting root.
Step 2: Create a backup of your .htaccess file.
Step 3: Delete .htaccess from your host/directory.
Step 4: After you've deleted the file, try logging into your WordPress dashboard.
Step 5: Create a new .htaccess file if the login process was successful.
Also, follow these steps to create a new .htaccess file:
Step 2: Go to your WordPress dashboard.
Step 2: Go to settings, then permalinks and click save to generate new .htaccess file.
Method 9: Increase Memory Limit
Assume your WordPress website is running out of PHP memory. This can cause issues with many aspects of your site and prohibit you from accessing your WordPress administration area.
There is also the risk that this issue will appear and disappear, making diagnosis more challenging.
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 solve this problem, you could ask your hosting provider to increase the PHP RAM limit for you. There may be other ways to increase the WordPress memory limit.
You can also try to increase the PHP max input vars to fix the issue.
Method 10: Correct your site URL
What WordPress deems to be the correct URL for your site is determined by the URL you define for it.
If the URL of your site is incorrect, you will be unable to log in because WordPress attempts to redirect you to the erroneous URL when you attempt to visit the WordPress login page when the URL is incorrect.
Follow these steps to fix the problem:
Step 1: Connect to your server via FTP or cPanel File Manager.
Step 2: Edit the wp-config.php file and add the following lines above the /* That's all, stop editing! Happy publishing. */ line:
Step 3: Replace https://yoursite.com with your WordPress website's actual URL.
You should be aware that after adding this code to your wp-config.php file, you will no longer be able to change your site's URL from the WordPress dashboard.
Method 11: Check File Permissions
There is also a less common issue with the file permissions on your server. Assume that the wp-login.php file and the wp-admin folder do not have the right file permissions. You will not be able to access the WordPress administrator dashboard in that event.
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:
Step 1: Connect to your server via FTP.
Step 2: Make sure that wp-login.php is set to 664.
Step 3: Make sure that the wp-admin folder is set to 775.
Method 12: Restore Your Backup
You may have created a backup using your web hosting service or a plugin. If you have a backup, it is advised that you restore it.
This step will result in the elimination of any recent mistakes that have occurred on your website.
If you restore a backup, you can access your WordPress admin page and log in as usual.
To guarantee that the mistake is permanently resolved, it should still be troubleshot to establish its root cause.
The goal of this article was to help you figure out why you can't access the WordPress administrative dashboard and how to fix it using various approaches.
Thank you for reading this article, and we hope it was useful in resolving this issue.