All managerial options are within the WordPress dashboard. What happens if you can’t access it anymore?

There are many reasons that can prevent you from logging into your WordPress dashboard. For example, database connection error, internal server error and etc.

Imagine trying to access the WordPress dashboard, but every time you enter your credential the login page gets refreshed. How can you fix this issue?

In this article, we try to explain what happens when you Can’t login to WordPress admin and how to fix it.

1. Delete cache and cookies

One of the easiest ways to fix this issue is by deleting your cache and cookies. A cookie is a small piece of data sent from a website and stored on the user’s computer by the browser.

You can deactivate this option from your browser’s settings. But don’t forget the WordPress login page requires these cookies. As you may already know every login page uses your browser’s cache.

WordPress uses cache as well. So, sometimes by deleting your cache and cookies and restarting your browser, you can gain access to your WordPress dashboard.

Here is how to delete cookies and cache in chrome:

  • Click on the three dots on the right-hand corner of the screen.
  • Click on History (and then History)
  • In the new window click on Clear browsing data
  • Choose both cache and cookies
  • Set Time range to All Time
  • Click on Clear Data

2. Change admin password via phpMyAdmin

Due to security purposes, users tend to change their password a lot, and they may forget their last password.

If you have forgotten your password and Can’t login to WordPress admin, from the login page click on “Forgot your password”.

WordPress will send you an email where you can change your password. But what if you don’t have access to your email?

Fortunately, there is a way to solve this issue. You can change your password via phpMyAdmin in your cPanel. To do so, simply follow these steps:

  • Open 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
  • Once you found it, click on edit
  • In user_pass enter your password in “value” section
  • Make sure you change “Function” to “MD5”
  • Once you are done click on Go to save your changes

Now open your WordPress login page and enter your new credential.

3. Disable WordPress plugins via FTP

If you Can’t login to WordPress admin consider that sometimes plugins can interfere with your login page. This usually happens when your plugins aren’t synced with one another.

To fix this issue you must disable all of your plugins. But how can you do that when you can’t access your WordPress dashboard?

To do so you need to use your FTP account and disable plugins through the host. Locate your WordPress files and go to wp-content/plugins. now change the folder’s name from plugins to something else.

You can rename it to anything, for example, plugins_old. by doing so your plugins will be disabled. Now try to login into your WordPress dashboard. If this fixes the issue then it means one of your plugins is interfering with your login page.

4. Disable WordPress theme via FTP

Just like plugins, themes too can interfere with your login page. Usually, this happens when your theme is not compatible with some WordPress versions.

To fix this issue you will have to disable your theme. To do so, use FTP to enter your root directory.

Head to wp-content/themes and simply rename “themes”. You can disable your activated theme. By doing so, WordPress won’t be able to locate the folder and it will automatically activate the default theme. Once you are done, try to login into the WordPress dashboard.

In addition, if you are currently using the default theme, you need to follow the steps mentioned above. After gaining access to your dashboard make sure you update your theme. Sometimes even the default theme can interfere with the login page.

5. Re-upload wp-login.php

If wp-login.php is moved or deleted, you won’t be able to access your dashboard at all. To fix this issue you have to re-upload the file. Before making any changes it is recommended that you backup your WordPress site data.

  • Head over to your hosting and find the folder you have installed your WordPress and look for wp-login.php
  • Download WordPress’ latest version and look for wp-login.php
  • Upload the new file in your WordPress directory
  • Open wp-login.php and look for redefining user_login
  • Right after the PHP code, copy and paste the code below:
// Delete this line
$user_login = $user_data["user_login"];
// Replace it with this line
$user_login = $user_data->user_login;

Save your changes and try to log in to your WordPress dashboard.

6. Generate a new .htaccess file

Sometimes a single line in .htaccess file can break your WordPress login page. If the file is broken it can cause many issues such as “login page refreshing error”.

To fix this issue you need to go to your hosting root. First, create a backup of your .htaccess file.

Then delete .htaccess from your host/directory. Once you have deleted the file try login in to your WordPress dashboard.

If you succeed you will then need to create a new .htaccess file. To do so, head over to your dashboard, go to settings > permalinks and click save.

Rate this post