How to Fix “You Are Not Allowed to Access This Page Error”

Ninetheme

How To Fix "Sorry, You Are Not Allowed to Access This Page" Error in WordPress?

Intro

This is one of the annoying errors in WordPress. It blocks you from making changes and working on your site but no need to be wory about that. In this article, we’ll be talking about the possible causes and solutions of the error. You can get rid of this error by following the steps that we will provide below.

Why This "Sorry, You Are Not Allowed to Access This Page" Appears?

Sorry, You Are Not Allowed to Access This Page Error

If you get such error message as shown up in visual 1 when you make changes to your site, it’s probably due to security or permission issues. There may be an inconsistance in the data that is transmitted between your site’s files and the database. When you install a WordPress theme or plugin, the data which is being stored in the database must match the version already in the database. Otherwise you will get this error. You can also get this error if the user name and password do not match the wp-config file. Another possible reason is that your site uses an older version of PHP.

Some Ways To Fix this Error

Important: Please make sure to back up your site before you try any of these methods. It is very important for you to restore your site when a potential error is made.

1. Check Out Your File Permissions

Incorrectly configured file permissions may cause this error and in order to make sure your file permissions are configured correctly, please check the following steps.

You need to connect to your server, where the theme and WordPress files are being stored, using an FTP Client. Then, navigate to public_html, in which you’ll see wp-admin, wp-content, wp-include files. Choose three of those files and click on ” File permissions “.

Sorry, You Are Not Allowed to Access This Page Error

Make sure the numeric value is 755 on the next screen and select “Recurse into subdirectories ” and “Apply to directories” just like in the visual 3.

Sorry, You Are Not Allowed to Access This Page Error

Make sure you’ve clicked on ” Ok ” button to save your changes. Then, get back to the public_html file again. Select all the remaining files except the three files you just changed ( wp-admin, wp-content, wp-include) and then click on the “File permissions” as shown in the visual 4.

Sorry, You Are Not Allowed to Access This Page Error

Make sure the numeric value is 644 on the next screen and select “Recurse into subdirectories ” and “Apply to directories” just like in the visual 5.

Sorry, You Are Not Allowed to Access This Page Error

2. Check Out Via WP_DEBUG

If you like to see the source of the error in your WordPress panel, you need to enable the wp_debug mode. To do that, add the following snippet code into wp-config.php file. This way, you’ll see the source of the error and what causing it.

define( ‘WP_DEBUG’, true );

3. Enable And Check Your Plugins Notifications

This can also be caused by a direct cyber attack. If you are using a security plug-in, you will receive notification and e-mail if suspicious activity occurs. You should check your Spam Inbox during this error because you may have received a security message at the same time that this error occurred. If you do not have such a plugin, you may use the “WP Activity Log (formerly WP Security Audit Log)” plugin. Using this plugin, you can control daily activities on your site.

4. Restore a Previous Version of Your Site

The steps that you took to resolve a problem that you encountered earlier may have caused this error. So you may encounter with this problem after your most recent ting you’ve done. For example, upgrading WordPress to its new version may cause this problem.

If you are sure about the last change you made to your site, it will be quite easy to resolve this error. For example, you can use the WP Rollback plugin to remove a theme or a plugin that causes it, or to install an older version. If you made a backup of your site before the error, you can remove this problem by installing your backup as well.

5. Review Your Server's Error Log

As we previously told you to check for PHP errors. In addition to this, you should also check your server’s error log. With this process you can reduce the number of possible causes and find a faster solution. If you have your server log-in credentials, you can review your server’s error log.
You can contact to your hosting provider to get further information.

6. Disable All themes And Plugins

As mentioned above, a theme or plugin that you just installed may have caused this error. As a strategy for finding a solution, you can disable your current theme and all plugins. After doing this, check to see if the problem still persists or not. If you do not receive errors, then the problem is not in your theme. Then, check your installed plugins one by one. If a plugin is causing it, you’ll notice it.

7. Reset Your .htacces File Manually

If the solutions haven’t worked so far, it could be from a code in your .htaccess file. What you need to do is to connect to your server and find the .htaccess file. Then, click to rename it. Change its name to .htacces_backup and then download it.

Sorry, You Are Not Allowed to Access This Page Error

Then, open it with notpad or open with notpad++  and rename it as ”  .htacces ” again. Lastly, replace all text in this file with the following snippet codes.

# BEGIN WordPress

RewriteEngine

RewriteBase /

RewriteRule ^ index.php $ - [L]

RewriteCond% {REQUEST_FILENAME}! -F

RewriteCond% {REQUEST_FILENAME}! -D

RewriteRule. /index.php [L]

# END WordPress

Finally, save the file and restore it to your site. With this process your .htaces file must be resettled. If the problem is related to this, it will already be resolved with this process.

8. Check Your Database Prefix

If you recently switched to a live server, an incorrect database table prefix may cause this error. To check that your site database prefix is correct, you need to open your wp-config.php File and wordpress database. You should then check that the prefix value (i.e. wp_) matches a value in your database.

Why is WordPress Security Important

If you have any questions about this article or other topics, please click the button below. Your questions will be answered soon.

Quality And Fast Hosting

If you want an affordable, reliable and fast WordPress server, just go ahead and click on the button and get a package as needed.