Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022 Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022 Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022
Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022 Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022 Black Friday SALE 50% OFF on the entire line of Qi products Discount code: BLACKFRIDAY2022

Get Qi Theme with 150 superbly designed WordPress demos

Get Qi Theme
Qi Theme
Sign up for our newsletter and be the first to get all the latest Qode news and updates.
BACK TO TOP

What to Do if You Can’t Access Your WordPress Admin

What to Do if You Can't Access Your WordPress Admin

WordPress is a user-friendly platform that allows both personal and business website creation. Thanks to its many features such as plugins, themes, shortcodes, and widgets, users with little to no coding knowledge can successfully create website content and manage it in almost all aspects.

However, to use all those features to their full effect requires users to be able to login to their WordPress admin dashboard. If you can’t access your WordPress admin, your ability to manage the website is drastically reduced, which can be quite stressful. Furthermore, solving this access issue can be a challenge, as there are a lot of reasons that could be causing it.

There are a lot of ways your inability to access the WordPress Admin could manifest—the login page keeps refreshing, a blank page or various errors show on the screen, the default login page is disabled or you’re unable to access it, and so on. In this article, we will try to cover as much as possible on these issues as well as the reasons behind them. We will also be taking a look at different troubleshooting methods you can try:

Reasons for not being able to access your WordPress Admin

There are quite a few reasons why you might not be able to access your WordPress admin dashboard. The most obvious ones are a typo in your WordPress login credentials or a caching issue. Apart from that, there are a lot of WordPress errors that can prevent access to the WordPress admin dashboard. Luckily, most WordPress errors are pretty well known and troubleshooting advice for those errors is easy to find.

However, you could be a victim of a hacking attack that resulted in you losing access to the WordPress Admin as a result. In those cases, you will need to engage more in malware scan and removal, as well as enforce tighter security on your website from now on. On the other hand, it’s also possible that you accidentally locked yourself out of the WordPress Admin area because of a security rule you set on the website.

Qode Themes: Top Picks
Bridge New Banner
Bridge

Creative Multi-Purpose WordPress Theme

Stockholm WordPress Theme
Stockholm

A Genuinely Multi-Concept Theme

Startit WordPress Theme
Startit

Fresh Startup Business Theme

How to regain control of the WordPress Admin

Now that the possible reasons behind this issue are clearer, let’s review the methods for solving it. They are divided into several sections, with special emphasis on the WordPress errors that prevent access to the admin dashboard. However, as we wanted to keep the article brief and to the point, some of those sections contain excerpts that have links to articles where we explore the issues in greater detail. With that being said, let us proceed.

Initial troubleshooting steps

Since there are multiple reasons why you might not be able to access WordPress Admin, we need to start investigating the most obvious ones to start with.

The first thing you should check is that you haven’t made a typo when inserting your WordPress credentials, particularly your password. Try to log in once more and carefully type in your WordPress username and password. Pay special attention to numbers, specific characters, and the existence of caps lock. If you are copy/pasting your login information from a file, make sure you do so correctly; it should be complete and not include any additional blank spaces.

Additionally, many WordPress login-related issues stem from issues with your browser cache and cookies. Therefore, you should clear the cache and cookies from your browser and then try to log in to your WordPress dashboard once more. You should make it a habit to erase your cookies and cache after every step suggested below as this will ensure that you are viewing the latest version of your website.

We will briefly explain how to clear your cache and cookies within the Chrome browser. To start with, click on the three dots in the top right corner. Hover over the History option and then click on the History sub-option. This will open the History page.

Chrome History

Select the Clear browsing data option from the menu on the left.

Chrome Clear History

A browser popup window will appear, with two tabs—Basic and Advanced. We will stick to the Basic one, which is open by default. Choose the time range and what type of data you wish to delete then press the Clear data button below. If you want more control over what data you delete, switch to the Advanced tab and follow the same steps as described above.

Chrome Clear History

Apart from typos and caching issues, another common reason why it happens that you can’t access the WordPress Admin is due to forgetting your password. If this happens, you should always try recovering your WordPress password using the recovery link found on the login page before going any further. The link is aptly named Lost your password and you can find it below the form on the login page.

Lost Password

Using this link, you will be able to recover the password for a given user thanks to the email address that is tied to it. If you aren’t familiar with this option or if you haven’t used it previously, you can take a look at our guide on restoring WordPress passwords.

Another way of regaining access to the WordPress Admin is by restoring a backup of your website made before this issue appeared. This depends on you making regular site backups and having them stored somewhere accessible.

However, if the previous pieces of advice haven’t helped you access your dashboard, it is time to turn to more advanced and intensive troubleshooting methods. As a precaution, we advise making a backup of your website beforehand. Some of these steps require you to edit your database and template files, so having a backup is vital. It can help you recover your site so that no additional harm is done to it in case you have any mishaps along the way.

Resetting the password via phpMyAdmin

If you can’t access WordPress Admin because of an issue with your password, and you weren’t able to restore it using your email, you can reset it via phpMyAdmin. To be able to apply this method, you will need to have access to your hosting control panel—in our case, that’s cPanel.

Log in to cPanel using your cPanel credentials and click on the phpMyAdmin option, which is located in the Databases section.

Databases phpMyAdmin

After that, find your website’s database from the list of existing databases and click on it to see the list of tables contained within it. Locate the wp_users table and then click on it.

phpMyAdmin

Users who aren’t certain what their database name is shouldn’t worry; you can easily find what it is using your wp-config.php file. Before you start checking, make sure that you have the file and folder permissions properly set up so that you can at least read the wp-config.php file. Then, return to the main view of your control panel and click on the File Manager option, located in the Files section near the top.

Files File Manager

Then, navigate to your root WordPress directory, often called public_html, find the wp-config.php file within it, and right-click on it. Select the View option from the dropdown menu that appears.

Change Password

Find the file and open it using any text editor. Then, within the file, look for the following line near the top:

define(‘DB_NAME’, ‘your_database_name’);

Please note, the your_database_name part will be replaced with your actual database name.

Change Password Code Line

Once you’ve figured out your database name, proceed following the steps described above. If you aren’t able to find the wp_users table, this may be because you’ve changed the default database prefix. Therefore, you should look for a table called yourprefix_users, where the yourprefix_ will be replaced with the prefix you set.

After opening the users table, look for the user whose password you wish to reset and click on the Edit button next to it.

Change Password Database

After clicking on the Edit button, you will be placed within the Insert tab. To reset your password, choose MD5 as the function for the user_pass and, within the same row, insert your new password as the value. When you’re done, press the Go button.

Insert New Password

Shortly after, you will receive a success message in the form of an SQL query that was run based on your previous actions. Once you’ve reset the password, try logging in to your website’s WordPress Admin once more.

Resetting your password via phpMyAdmin is one of the several ways of resetting it without WordPress Admin access. If you want to learn more about other possible ways you can do so, you can take a look at our article on resetting admin passwords in localhost.

Disabling a security/login plugin via FTP temporarily

Some security plugins have a feature that denies access to the website after several unsuccessful login attempts. Even though this feature is highly effective against brute force attacks, it can backfire. In the case that you have forgotten your WordPress password, you could end up locking yourself out of your WordPress admin dashboard. To remove that lock, you will need to disable the security plugin that created it via FTP.

Similarly, if you changed the default login suffix using some WordPress plugin, but have forgotten what it was in the meantime, then the best way of regaining access to your WordPress Admin is by disabling that plugin. By doing so, you will reactivate the default login suffix (wp-admin or wp-login.php) and you will be able to recover the password using the method described previously.

As a requirement of the process for disabling a plugin, you need to install and know how to use an FTP client. Then, connect to the server using your FTP credentials and navigate to the root WordPress directory, often called public_html.

Public HTML FTP

Next, navigate to /wp-content/plugins. Locate the directory of the appropriate security plugin, right-click on it, and select the Rename option.

Disable Plugin

Renaming the plugin directory will disable the plugin connected to it. You can change the name to whatever you wish, but we suggest leaving the original name and adding a symbolic suffix, like .deactivated or .old.

Wordfence

After you disable the plugin, you will be able to log in to the WordPress admin dashboard of your website. If you have forgotten your WordPress password, you can use one of the recovery methods we discussed already.

Once you have access to the dashboard again, you can re-activate the security plugin (by using FTP to change its name back to what it was). Then simply whitelist your IP, to prevent being locked out of your WordPress Admin in the future.

As for the plugins that change the default login URL, after regaining access, you can also reactivate it manually via FTP. However, we advise saving your login URL somewhere, to prevent these kinds of login issues in the future.

Restoring administrator privileges

In some cases, you will be able to log in to your website, but you will only have access to some basic functionalities that don’t include your plugins or themes. More precisely put, your account will be stripped of its administrator privileges. Unless you have done this by accident, it is most likely that you were a victim of a hacking attack and that the attacker has changed your user role to a non-administrative one.

To tackle this issue, you will need to create a new admin account using phpMyAdmin. Then you will be able to log in with the new account and restore the administrative privileges to your original one. To learn more about creating an admin account, you can check out our article on adding a user to the WordPress database. It covers the process of adding users of any default user role, with an emphasis put on the admin role, as the most important.

Additionally, we suggest changing the passwords afterward and advising your existing WordPress users to do the same. Then, you should scan your website for potential malware. Consider using a security plugin on your website that enforces stricter rules and seek a malware removal service if you need to.

Common WordPress errors that deny access to the WordPress Admin and how to solve them

There are quite a few WordPress errors that can make it so you can’t access the WordPress Admin area, and in this section, we will cover some of the more common ones. Also, we will briefly explain what causes those errors and how to solve them. For a full overview of the errors, we suggest reviewing the attached articles. Additionally, some steps (e.g. disabling plugins and themes via FTP) may repeat as they are generally always part of the troubleshooting process for various WordPress errors, while others may be unique, reserved for addressing specific errors. Finally, if you haven’t done so already, we strongly advise making a backup of your website before proceeding.

  • Login redirect loop error

If you are experiencing an issue where the login page repeatedly refreshes after you try to log in with your credentials, then your website is stuck in a login redirect loop. Luckily, the methods for solving this error are relatively easy—clearing the cache, disabling plugins and themes, restoring the default .htaccess file, and properly configuring WordPress URLs. To learn more about this error and the exact troubleshooting steps, you can take a look at our guide on solving the WordPress login redirect loop.

  • Error establishing a database connection

The name of this error comes from the specific error message shown when it occurs.

Database Connection Error

The error is caused by incorrect MySQL settings. It can be solved using a couple of approaches that involve editing the wp-config.php file. To find out more about the process of troubleshooting, you can examine our article on the error establishing a database connection.

  • White screen of death error

As the error name implies, the white screen of death is categorized with a white error screen that might seem daunting to solve. However, in most cases, this error is caused by a lack of PHP memory, some server issue, or a coding mistake in the files of your plugins or theme. If this happens, you should receive an email that will contain a link for logging back in to the WordPress Admin using recovery mode. The email will also contain the error log which will indicate the faulty plugin or theme. To learn more about solving this error, check out the tutorial on fixing the white screen of death.

  • Syntax error

A syntax error indicates that there is an error in the code, most often it originates in some custom code you inserted. The name is derived out of the error message that contains the phrase syntax error and/or parse error, which is shown when the problem occurs.

To solve this error, you will need to carefully review any code you previously inserted. You will need to pay special attention to the little syntax details that are often overlooked. Make sure that all opening tags, brackets, and quotation marks have a corresponding closing tag, bracket, or quotation mark. Also, make sure that every distinct code line ends with a semicolon(;). If you have copied the code from somewhere, make sure that you properly pasted it so it’s whole.

Furthermore, we advise using a plugin called Code Snippets for adding custom code to your website. This plugin has a feature that prevents syntax errors from locking or breaking your website. In the case a syntax error occurs, you will receive an error message similar to the one shown below. From there, you will be able to return to your website by pressing the back button in your browser.

Error Handling With Code Snippets

As this plugin enables you to store custom code as separate code snippets, you will be able to easily pinpoint which snippet is causing a problem. Also, with syntax errors, that code snippet would be reverted to the last saved state that’s safe. To learn more about this topic, take a look at our article on site-specific plugins where we cover the Code Snippets plugin and what to do in case of syntax errors.

Setting the proper WordPress URL

If you’ve recently changed your domain or moved from HTTP to HTTPS, you might end up getting locked out of your WordPress Admin. In that case, you should check if your WordPress and Site address were properly updated. If they weren’t, you need to adjust your WordPress and Site address by editing your wp-config.php file. And you will need to update those URLs in your database, as well. Make sure to create a database backup before running any queries that can affect it.

Contacting your hosting provider

If you have tried all the suggestions so far and you still can’t access your WordPress admin dashboard, you should contact your hosting provider and ask them for help. Their support service will be able to monitor the issue with your website on their end. This will help them provide more information on what is causing it and how to solve it.

Final Thoughts

Realizing you can’t access your WordPress Admin when you try to log in can be stressful as it slows down your workflow by making your website impossible to manage. There are a variety of reasons as to why this issue can occur. We took a look at some of them—ranging from serious WordPress errors to simply mistyping your password. And every potential cause we addressed was accompanied by suggested means of solving it. So, review the article carefully and apply the troubleshooting approach that fits your situation best. We are confident that you will be able to solve your access problem quickly thanks to these tips!

Post your comment

Comments0