7 Ways to Fix the ‘Sorry You Are Not Allowed To Access This Page’ WordPress Error
A WordPress error serves as a note or notification that something is wrong with your website. However, the message “Sorry, You Are Not Allowed to Access This Page” WordPress Error is meant to assist you.
There are various reasons for that specific error, and most of them can be solved with a few simple skills. You’ll be back up and running in no time until you’ve narrowed down the problem and fixed it.
This article will show you how to repair the ‘Sorry You Are Not Allowed to Access This Page’ WordPress error in seven different ways. Let’s start by giving you some more detail about the error.
How to Understand the ‘Sorry You Are Not Allowed to Access This Page‘ WordPress Error?
Unlike many other WordPress errors, the “Sorry You Are Not Allowed to Access This Page” alert does not indicate your site’s problem.
In reality, the end-user could not notice any differences in their experience. Until a resolution happens, you will be unable to access your website.
Some configuration error causes the problem. As you can see from the note, user permissions are often the root of the problem. As a result, you’ll typically notice this error after making adjustments to your site’s back end. Updates may also be to blame.
The Tools you’ll need Before Tackling the Sorry You Are Not Allowed to Access This Page WordPress Error
Before you start fixing the ‘Sorry You Are Not Allowed to Access This Page’ error you will a few resources and elements. Here’s a rundown of what you’ll require:
- At the very least, you’ll need administrator access to your server’s root directory.
- Cyberduck or FileZilla are examples of Secure File Transfer Protocol (SFTP) clients.
- Before you begin, you will need to sharpen your FTP skills.
- A text or code editor that allows you to work with the files on your website. Your default text editor is usually sufficient, but a code editor such as Atom or Notepad++ is preferable.
How to Fix the ‘Sorry You Are Not Allowed To Access This Page’ WordPress Error
1. Check Your WordPress Error Log for Clues
Checking your error log is the first move to assure your WordPress website accessibility. A pointer will frequently appear to assist you in selecting one of the other methods mentioned below.
Some hosts have a dashboard with links to the WordPress error log. If that isn’t the case, there is a simple solution. To begin, log in to your site via SFTP using the credentials provided in your hosting control panel. Usually, the website is in the public HTML or www archive. It could, however, be in a folder named after your website.
How to:
You’ll see a list of your main WordPress files once you’ve logged in:
Look for a debug.log file from here. It’s also likely that it’s in the wp-content folder. Unfortunately, if it isn’t there, you’ll have to repeat the following nine measures. Even if you allow debug mode and retest, you’ll still use the same methods to fix the issue.
2. Ensure Your File Permissions Are Correct
We can check some other aspects of your site under the hood while we’re using SFTP. Since file permissions are a common cause of the ‘Sorry, You Are Not Allowed to Access This Page error’, it’s a good idea to start there.
Select the wp-content, wp-includes, and wp-admin folders in your SFTP client. After that, right-click and look for the File Permissions option. In FileZilla, this is a visible choice, but in Cyberduck, the settings are hidden in the Info panel:
- Make sure that you set the permissions as follows in the dialog box:
- 755 is set as the Numeric Value.
- You’ve selected the choice to apply only to directories.
- The option to recurse into subdirectories is allowed.
- Accept your changes, then pick all of the other files in your site’s directory and open the File Permissions dialog once more:
Check to see if the error is gone at this stage. If not, move on to the next step.
3. Make Sure Your wp-config.php File Is Free From Errors.
In a nutshell, the wp-config.php file includes all of your WordPress website’s configuration settings. As a result, you’ll want to double-check that it hasn’t been tampered with or altered.
Right-click the file in your SFTP client and open it with your text editor. Scanning the file for something that stands out is the next step.
However, there is one setting in this file that you should remember for later. Scroll down to the $table prefix setting in the wp-config.php format. Take note of the value – it’s usually wp_:
4. Check Whether Your Plugins Are At Fault
Given that a lack of user permissions causes the error we’re dealing with, it’s a good idea to double-check your WordPress plugins and themes as well. Your permissions may have changed as a result of recent changes.
Step 1
We’ll need to use SFTP to get into your site’s directory once more. If you’ve logged in, look for the plugins directory in the wp-content folder:
By renaming the folder to something other than WordPress Plugins, we can easily see if there’s a problem:
Check your WordPress website for the error after you’ve done this. If it’s gone, it’s because of a single plugin. To proceed, rename and open your plugins folder. There are directories for each of your installed plugins inside.
Step 2
After that, you’ll need to rename each plugin folder one by one and search your site for the error.
You’ll have to make a notification once you’ve located the offending plugin. You can either uninstall it completely, find an alternative, or request a patch from the developer.
However, if the site remains unchanged, it’s possible that a theme is to blame.
5. Activate a Default Theme
A recent WordPress update, including your WordPress plugins or theme, may have brought your site down. Fortunately, testing for this is similar to testing for plugins. To summarize:
- Locate the wp-content/themes directory.
- Test the front end of your site since renaming it.
- Rename the themes folder and go through each specific theme before finding the culprit if the error has gone away.
If your theme is critical to your site and workflow, you can contact the developer for assistance. Finding another appropriate theme, on the other hand, is probably a better choice.
If the error persists, rename your themes folder and proceed to the next level.
6. Generate a New .htaccess file
Before you abandon SFTP, there’s one more thing you should do to restore your site’s functionality. Your .htaccess file is an Apache server configuration file that could be causing your problems.
To find out, use SFTP to access your site’s root directory. Look for the .htaccess file once you’ve arrived. If you can’t find it, it’s either a secret file or your host’s server is down (usually Nginx). If the latter is the case, you can proceed to the next level.
However, once you’ve located it, right-click and rename it to something more appropriate –.htaccess-backup is ideal. Then, using the right-click menu, save the file to your screen. Now you’ll want to open the file in your text editor, delete everything in it, and add the following code:
Check your site once more, and then move on if the error persists.
7. Make Sure Your User Role and Table Prefix Is Correct
The final stage abandons SFTP in favor of phpMyAdmin, a program that allows you to access your WordPress database. All on your WordPress site is stored in the database, including your user position. If updating from an Administrator role, you may lose access to some parts of your site.
Where to find the phpMyAdmin?
This is where you can go if your hosting control panel gives you access to a database tool. Although the position of the connection depends on your hosting company, there should be one to follow:
Search for your database after you’ve logged in. The name must be the same as the one in your control panel. Take a look at the database’s ‘tables,’ which are the different entries. They should all start with the same prefix:
- To proceed, go to the wp users table and look for your username and ID in the right-hand list.
- After that, look at the wp capabilities row in the wp user meta table. In the meta value field, your user function will be displayed.
If this says something other than the administrator, you can change the wording by clicking the Edit link, being careful not to change any of the surrounding text.
Finally, double-check your site to see if the WordPress error is gone.
Then Follow These Steps If the WordPress Error Still Persists
The first step is to examine your error log. A pointer will usually appear to help you choose one of the other methods mentioned below.
A dashboard with links to the WordPress error log is available on some hosts. There is an easy solution if this isn’t the case. To begin, use the credentials given in your hosting control panel to log in to your site via SFTP. You will find the website in the public HTML or www archive. However, it may be in a folder named after your website domain.
Look for a debug.log file in this directory. It’s also possible that it’s in the wp-content directory. If it isn’t there, you’ll have to go through the next nine steps again. You’ll always use the same methods to address the problem, even if you allow debug mode and retest. There are a few more steps you can take if you’re still having trouble solving the problem. Each will, however, be determined by how the error affects your site, the level of access you have, and the level of access your host provides.
There are three more ways to fix the problem:
- Use a recent WordPress website backup to restore your site. If you don’t have access to your site’s dashboard, this won’t be easy. However, your host can be able to perform a server backup for you. Our recommendation is to contact them and inquire.
- Update the PHP version on your machine. A recent shift may have impacted you, but it’s impossible because you made the change yourself. Your PHP version could, however, have been updated by your host.
- Reset your WordPress account in its entirety. Resetting the whole WordPress site with a WordPress Reset tool is a last resort, but it is possible. However, we recommend that you avoid this choice for all but the most recent websites.
The common denominator here is that you should contact your WordPress hosting providers, who will most likely be able to assist you further, even if a reset sounds like a good idea; getting in touch with help first is a good idea.
In conclusion
WordPress website errors never seem to appear at a convenient moment. Both the backend and the frontend are typically lost. This WordPress error, on the other hand, does not follow this pattern. It’s a note about user permissions rather than a site malfunction. And always make sure to follow our best practice of 25 Things to Check Before, During, and After Launching a WordPress Website or Blog.
I hope this WordPress tutorial helped you learn how to Fix the ‘Sorry You Are Not Allowed To Access This Page’ WordPress Error. And for more WordPress, free step-by-step tutorials visit our dedicated WordPress tutorials section (You can find more tutorials like How To Fix The WordPress White Screen Of Death) and check our Best WordPress hosting providers guide if you are still looking for a host to start your blog.