Fix the “Sorry, You Are Not Allowed to Access This Page” Error in WordPress

Are you frustrated by the “Sorry, you are not allowed to access this page” error in WordPress?

This error usually displays when you’re attempting to see a page in your WordPress dashboard that your user job doesn’t have permission to see.

However, you may see the error at times in any event, when you should have access to that page. This error can be caused by a parcel of different reasons which makes it interesting for amateurs to investigate.

In this article, we’ll show you how to fix the “Sorry, you are not allowed to access this page” error in WordPress.

What Causes the “Sorry, You Are Not Allowed to Access This Page” Error in WordPress?

WordPress user jobs and permissions characterize what your users can and can’t do in WordPress. For example, an author on your site wouldn’t have the option to alter the post of another author, only their own posts.

If someone gave an author the link to alter someone else’s post, then they would see the “Sorry, you are not allowed to access this page” WordPress error when following the link.

However, in some cases, you may see “Sorry, you are not allowed to access this page” when you ought to have access to see the page.

Read More: Com vs Net – Difference Between Domain Extensions

If you’re not the site proprietor or administrator, and you’re seeing this error, then you should contact the site proprietor or admin to tell them. They can explain why you don’t have access to the page, or they can change your job to grant you access.

If you are the webpage proprietor or have an admin job, however, you’re actually seeing the “Sorry, you are not allowed to access this page” error when attempting to sign in to your own site, then something has gone wrong with the permissions.

Maybe there was an issue with a WordPress update. Maybe there was an issue when a theme or module was updated. Or maybe something has gone wrong with your configuration.

If you’re seeing this error when you attempt to sign in, then you won’t have the option to fix the error by changing your WordPress settings in the dashboard. You’ll have to work with the files and databases straightforwardly.

This can be precarious for fledglings and making a mistake could make things worse. As a precaution, we suggest you first make a total backup of your WordPress site.

You could also start by contacting your facilitating supplier. They may have the option to fix the issue for you.

That being said, here are a few steps you can follow to investigate and fix the “Sorry, you are not allowed to access this page” error in WordPress.

Checking You Have the Correct WordPress Role

If you’re able to sign in to the WordPress dashboard, yet can’t access specific pages, then the issue could be that your WordPress user job was changed, and you’re presently not an admin.

From the WordPress dashboard, you can see your user job by visiting the Users > All Users page, and looking under the ‘Job’ segment.

If you don’t have access to the Users page, then this means that you are not an administrator.

If you or someone else accidentally deleted your administrator account or changed your user job, then you can add another admin user with phpMyAdmin.

Checking for a Corrupt .htaccess File

If you have an admin user job, and you’re actually seeing the “Sorry, you are not allowed to access this page” error, then it very well may be caused by a corrupt .htaccess file. We can check this by renaming the file.

You should use an FTP client or the file manager feature in your WordPress facilitating account. If you haven’t used FTP before, then you may want to see our aide on how to use FTP to upload files to WordPress.

Using your FTP client, you need to navigate to the root folder containing all your WordPress files. Once you find the .htaccess file you need to rename it to something different, for example, .htaccess.old.

If you cannot discover your .htaccess file, then see our aide on how to discover .htaccess in WordPress.

Once you rename the file, take a stab at signing onto your WordPress site to check whether that has fixed the issue. If it hasn’t, then rename it back to .htaccess and continue on to the following stage.

If you can sign in, then you fixed the issue. The following stage is to generate another .htaccess file. To do that, navigate to the Settings > Permalinks page in WordPress.

Basically click on the Save Changes button at the bottom of the page and WordPress will generate a new .htaccess file.

Checking for Incorrect File Permissions

While you have your FTP client open, we’ll check to make sure there isn’t an issue with your file permissions. File permissions control who can access files and folders on your site.

The accompanying settings are suggested for most users:

  • 755 for all folders and sub-folders.
  • 644 for all files.

Using your FTP client, you need to navigate to the root folder containing all your WordPress files and select the wp-admin, wp-content, and wp-incorporates folders. Then you need to right-click and select ‘File Permissions.

This will raise the file permissions dialog box.

Now you need to enter 755 in the numeric value field. After that, you can click on the ‘Recurse into subdirectories’ checkbox and then select the ‘Apply to directories only‘ option.

Click on the OK button to continue. Your FTP client will start setting file permissions to folders and sub-folders. You should wait for it to wrap up.

Then, you need to choose all files and folders in the root folder of your WordPress site and then right-click to choose file permissions.

The file permissions dialog box would appear.

This time you need to enter 644 in numeric value. After that, you need to click on the ‘Recurse into subdirectories‘ checkbox and then select the ‘Apply to files only‘ option.

Click on OK to continue and your FTP client will now start setting file permission to all files on your WordPress site.

Once you’ve done this, have a go at signing into your WordPress site again. If you’re effective, then you’ve fixed the issue. If not, then continue on to the following stage.

Deactivating All Plugins Using FTP

If the steps above haven’t settled the issue, then our following stage is to check whether a faulty WordPress module is causing the error. We’ll do that by temporarily deactivating all modules.

To begin with, you need to connect to your site using an FTP client. Once connected, you need to navigate to the/wp-content/folder.

Once there, you will see a folder called modules. This is the place where WordPress stores all modules installed on your site.

You need to right-click on the modules folder and select Rename. Then, you should type in a different name. We will call it ‘plugins.deactivate‘.

All of your modules have been deactivated. Now attempt to sign in to your WordPress site to check whether this has fixed the issue.

If you actually get the “Sorry, you are not allowed to access this page” error, then the issue isn’t caused by a module. You’ll have to rename the ‘plugins.deactivate‘ folder back to ‘modules’ and continue on to the following stage.

If you can now sign in, then you know that one of the modules is causing the error. We simply have to discover which one.

Using your FTP client, rename the ‘plugins.deactivate‘ folder back to ‘modules’ then navigate inside the modules folder. Now rename the first module to something like ‘module name.deactivate‘.

Now return to your site to check whether you can sign in. If you can’t, then change the module’s name back and continue on to the second module. Repeat the interaction until you track down the one that caused the issue.

Once you’ve tracked down the faulty one, you can change to a different module that doesn’t cause the issue. Or you can contact the module author and work with them to think of a solution.

Activating the Default Theme Using FTP

If the module solution didn’t work for you, then we’ll have to check if your WordPress theme could be causing this issue.

This progression is similar to deactivating your modules. You’ll have to connect to your site using an FTP client and navigate to the wp-content folder.

Once there, you will see a folder called themes. This is the place where WordPress stores all themes installed on your site.

This time you need to right-click on the modules folder and select Rename. We’ll call it ‘themes.deactivate‘.

This will activate the default theme. Now attempt to sign in to your WordPress site to check whether this has fixed the issue.

If you actually get the “Sorry, you are not allowed to access this page” error, then the issue isn’t caused by a theme. You need to rename the ‘themes.deactivate‘ folder back to ‘themes’ and continue on to the following stage.

If you can sign in, then the past theme caused the issue and you can start to investigate. You could take a stab at using a different theme or reinstall the same theme and carefully configure it.

If the error returns, then report it to the theme author. They may have the option to assist you with taking care of the issue or fix a bug in the theme.

Final Troubleshooting Steps

If you’re actually reading, then unfortunately the other steps haven’t tackled your concern. Here are a couple of more things you can attempt.

Check Error Log

You may have the option to check an error log for signs about what turned out badly. Your facilitating supplier may be keeping logs, or you may have recently set WordPress up to keep them.

Also see: Com vs Net – Difference Between Domain Extensions

For more details, check our aide on how to set up WordPress error logs, or contact your facilitating supplier.

Update to Latest PHP

If your WordPress site is running a more established version of PHP, then it very well might be causing issues. Upgrading to the latest version may be useful.

Also see: How to Choose the Best Domain Name

For more information, check our aide on how PHP updates by your web have impacted your WordPress webpage or contact your facilitating supplier.

Restore Your Most Recent Backup

If you’ve made a new backup of your WordPress site, then restoring it to an earlier version is probably going to fix the “Sorry, you are not allowed to access this page” error.

The issue is, you will lose any changes to your settings and content made after the backup.

For more information, check our amateur’s aide on how to restore WordPress from backup.

Contact Your Hosting Provider

If you are unable to fix the error on your own, then you should contact your WordPress facilitating company to check whether there is anything they can do.

Also see: How to Change or Remove ‘Howdy Admin’ in WordPress

Many suppliers offer astounding technical support and may have the option to tackle the issue for you.

For example, they may have the option to check their worker error logs or have created their own backups of your WordPress site. They will actually want to advise you on how they can help and what you ought to do straight away.

Leave a comment

Your email address will not be published. Required fields are marked *