Is the WordPress site health showing you an urgent error and rectifications required? This guide explains how to improve WordPress site health score.
We get it. It is scary when you are not being able to access your beloved WordPress backend. Your mind starts to play tricks on you—your site has been hacked, website security compromised and maybe you are the only administrator-level user that has access to the WordPress backend. Not being able to access wp-admin literally means you are 'toast'.
Don't worry. We will teach you how to regain control of your WordPress backend and solve the "unable to access wp-admin login" problem in just a few simple steps.
If you are in the mission of building success WordPress sites, you should sign up for our once-a-week newsletter. Plus, we have some awesome gifts when you signed up. Get the free gift right here.Editorial Team @ WP Maven
The most effective way to solve a WordPress problem is to understand the core reason why the matter is happening. In this case, we need to understand why you are not able to access your site via WP-Admin page.
Here are the most common causes 'for this error, “Sorry, You Are Not Allowed to Access This Page”:
Ultimately, seeing this notification simply means there’s a permissions setting that’s blocking you from a certain area. This becomes a problem when you’re locked out of a part of your site that you should have permission to enter which, as an Administrator, is anywhere on the backend.
The beauty of using WordPress is that there are many solutions to a problem. For this example, there are 11 quick fixes that you can take/consider to regain access back to your WordPress backend.
Let's go through one by one of them.
By far, this is the easiest method to get access to your WordPress admin. Instead of all the hassle and stuff, this method ensures that you get the access you needed and fast.
The drawback to this solution is that you may lose your recent changes and will have to find a way to accomplish your goals without causing the same error again.
RestoIf you are using Kinsta hosting as we do, you can easily restore your site via MyKinsta with any of the 14 nightly backups you have in your account (FYI, Kinsta offers automatic and daily backup).
You can then test different modifications to determine what caused the problem. After uncovering the root of the issue, you can undo the troublesome change to regain access to your site.
We install WordPress plugins for specific functionality—but if it is done right, it can cause us many problems including not allowing us to log in to our WordPress backend.
The solution to this is to deactivate all the plugins at once and reactivate them one by one. This troubleshooting method is time-consuming but it will give you an exact idea on which plugin is giving you conflict.
To start the troubleshooting process, you need to access your backend system using an FTP. We recommend FileZilla as it is the easiest to use. Once you’ve done so, navigate to wp-content and find the sub-directory labeled plugins:
Enter this folder, and then rename your most recently-added plugin to something like “plugin-name_old”. Go back to your site and check to see if the error is resolved. If not, change the plugin’s name back and repeat the process with the next one.
Your recent installed WordPress theme might be the one causing the access limitation. Your best bet for resolving this problem is to activate a default WordPress theme such as Twenty Twenty.
To do so without access to your admin area (wp-admin), you’ll need to use FTP again. Connect to your server with FileZilla and then navigate to wp-content > themes:
There is always a possibility is that your user role has been inadvertently changed and you are no longer listed as an Administrator. Don't worry, this is very common especially when you are managing a multisite WordPress installation or when you have more than one administrator.
To determine if this is the cause of not being able to login to wp-admin, you’ll need to access phpMyAdmin and look for the wp_users table:
If you have Administrator privileges, the meta_value in this row will read:
If your wp_usermeta table says something else, you can click on the Edit link and change it. Alternatively, you can also create an entirely new Administrator account from phpMyAdmin. To take this route, return to the wp_users table and click on the Insert tab at the top of the table:
Then, fill in the fields with your new user information. Once you’re done, click on the Go button and your new user should appear in the table. Next, you’ll need to make a note of the ID for this account and head back to the wp_usermeta table.
Click on Insert again, and fill in the resulting fields with the following information:
Now, you should now be able to use your new credentials to log in to your wp-admin. Once you had successfully login into the account, consider deleting the old account or change its user role back to the Administrator from the dashboard and delete/remove the temporary one you had created.
Last but not least, there are always the possibilities that there is a config issue in your wp-config.php file. Now, there are two things that might cause this:
Incorrect changes to your WordPress configuration file will lead to "blocked access to WordPress admin".
If you received the “Sorry, you are not allowed to access this page” message right after editing the file, the problem lies within the file. You should revert the file to the original state to solve this error.
If you have not touched the file or you have literally no idea where the file is, then there is a real possibility that your WordPress site has been hacked.
So, how do you solve this problem?
We recommend you to access your wp-config.php file using SFTP and look for anything that seems amiss.
Alternatively, you can reach out to your web hosting company and ask if they can check the log for any file updates in the past day or so.
P.S. A good web hosting company will always help you out on this.
We hope that the above 5 steps will help you gain access to your WordPress admin. We also want to stress that this is important for you to take WordPress security measures when you encounter such error.
After all, it is never too late to be safe especially in this vulnerable state we are in right now (virtual world).
If you are serious about taking your WordPress security to new levels, it is best to start with your web hosting company. A good website hosting solution will act as the first layer of security protection for your website. We use Kinsta for bulletproof hosting security and you can read our review on Kinsta hosting. It offers very competitive pricing and by far, one of the best in the market too!
Love what you are reading? Sign up for our weekly newsletter and stay updated with the latest WordPress updates!
Want to build an email list? Here are the top 5 and best popup plugins for WordPress websites. These are free and paid popup WordPress plugins for beginners.
What is a perfect blog post template? WP Maven shares with you our custom blog post template that we use for our own website and company blog.