Can’t Login to WordPress Admin? (8 Solutions)

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:

  1. Click on the three dots in the upper right corner of your browser.
  2. Go to the More tools option, then click on the Clear browsing data.
Go to the More tools option, then click on the Clear browsing data
  1. Select All time.
Select All time under Basic
  1. Check all the Boxes under Basic.
Check all the Boxes under Basic.

  1. Click on the Clear data button.
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.

Reset Your Password Using WordPress

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:Β 

  1. Go to your site’s server.Β 
  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:

Go to File manager, then /wp-content/plugins and select the folder related to your security plugin.
  1. 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:

  1. Go to your cPanel.
  2. In the database section, look for β€œphpMyAdmin”
  3. Once a page opens on top bar click on β€œDatabase” so you can view every available database.
  4. Select your WordPress database.
  5. Look for _users in WordPress sites this table is called wp_users, then click on edit.

Change admin password via phpMyAdmin
  1. In user_pass, enter your password in β€œvalue” section.
  2. Make sure you change β€œFunction” to β€œMD5”
  3. 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:

  1. Go to your FTP account and disable plugins through the host.
  2. Locate your WordPress files and go to wp-content/plugins.
  3. 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:

  1. Use FTP to enter your root directory.
  2. 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.
  3. 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:

  1. Go to your hosting and find the folder you have installed your WordPress and look for wp-login.php
  2. Download the latest version of WordPress and look for the wp-login.php file.
  3. Place the new wp-login.php file in your WordPress directory.
  4. Open wp-login.php and look search for redefining user_login
  5. 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:Β 

  1. Go to your hosting root.Β 
  2. Create a backup of your .htaccess file.
  3. Delete .htaccess from your host/directory.
  4. Try logging into your WordPress dashboard after you have deleted the file.
  5. Create a new .htaccess file ig the login process was successful.

Also follow these steps to create a new .htaccess file:

  1. Go to your WordPress dashboard.
  2. 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:

  1. Connect to your server via FTP or cPanel File Manager.
  2. Edit the wp-config.php file and add the following lines above the /* That’s all, stop editing! Happy publishing. */ line:
define('WP_HOME','https://yoursite.com');

define('WP_SITEURL','https://yoursite.com');
  1. Replace https://yoursite.com with your WordPress website’s actual URL.
Correct your WordPress site 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:

  1. Connect to your server via FTP.
  2. Make sure that wp-login.php is set to 664.
  3. 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.

Conclusion

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.

Please contact us and comment if you have any questions about the topic. If you enjoyed this article, please spread the word among your friends on Facebook and Twitter.

Leave a Reply