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

You awoke in the morning to find a “Sorry you are not allowed to access this page” error on your WordPress site. What are your plans? Such an error can ruin your morning, and you may not be able to repair it with simple efforts. This error can arise for a variety of reasons, and it can be a little bit difficult for beginners to debug. To solve this issue we’ll guide you through the many potential options to help you pick the one that’s right for you.

Sorry You Are Not Allowed to Access This Page

When editing or using your WordPress site, you may occasionally receive an error or a warning stating that “Sorry you are not allowed to access this page” . 

This problem is fundamentally caused by a security or permissions issue. However, diagnosing the deeper cause might be difficult.

For example, there might be a mismatch between the data exchanged between your website’s files and the database. If the stored data for a theme, plugin, or WordPress core component does not match the version in the database, requests will fail and the “Sorry you are not allowed to access this page” message will appear.

What Causes “Sorry You Are Not Allowed To Access This Page” Error In WordPress?

One likely cause is your PHP version of your local site or even live sites too. If your site is running an old version of PHP, the main reason is most likely here, and you must patch your PHP immediately.

Last but not least, access rules imposed by file permission settings may be the next explanation. WordPress will restrict your access if it does not identify you as an authorized user or administrator, resulting in the error.

To summarize, the probable primary causes of this condition include

  • Mismatched data in the wp-config.php file
  • File permissions are incorrect.
  • PHP version that is no longer supported
  • Plugins and themes that are corrupt

Now that you know what causes the “Sorry you are not allowed to access this page” error, let’s get to the bottom of the issue.

Easy Ways To Fix “Sorry You Are Not Allowed To Access This Page” 

The “Sorry you are not allowed to access this page” problem is tricky to rectify due to its numerous probable sources. This lengthy list of solutions may seem frightening, but it covers a wide range of conditions to help you select the best one for your site.

1. Restore Your Website To Its Pre-error Version

It helps to remember the last modification you made on the site while resolving any issue. After all, such adjustment might have resulted in the mistake. It may have been anything from upgrading to a new WordPress version to moving your site from a local environment to making major PHP updates.

If you know what the last update you made to your site was, reverting it is a straightforward solution. This might imply deactivating the theme or plugin you suspect is to blame, or utilizing a plugin like WP Rollback to restore an earlier version. You might alternatively restore your WordPress site from a backup created before the problem occurred if you have one.

Sorry You Are Not Allowed to Access This Page

2. Confirm Your Database Prefix Is Accurate

there is always a prefix assigned to each MySQL database. If the one in your website’s files does not match the one in phpMyAdmin, you will receive the message “Sorry you are not allowed to access this page.”

This might happen when transferring your site, for example, if you deployed a local staging server for development and are now migrating to a live server. To check for discrepancies, you’ll need to access your wp-config.php file.

Log in to phpMyAdmin and check the table prefixes in your database. They should match the ones listed in your wp-config.php file, like in the image below:

Sorry You Are Not Allowed to Access This Page

3. Deactivate All Your Plugins & Themes

As previously stated, a newly installed or updated theme or plugin might result in the “Sorry you are not allowed to access this page” issue. As a result, deactivating all plugins and your active theme is a good plan. If you are unable to access the admin dashboard, you must manually disable your themes and plugins using FTP.

After that, check to see if the problem is still persisting. Whether it isn’t, you should reactivate your theme and individual plugins one at a time, testing each time to see if the issue has returned. When the issue reappears, you can almost always be certain that the previous theme or plugin you reactivated is to blame. Simply disable it and uninstall it from your site.

4. Restart Your WordPress Website At Least Twice

In the worst-case situation, the error is caused by an installation problem. You may need to reset your WordPress site to deal with it. Before you get your hands on it, make a backup of your WordPress site to avoid losing any vital data or content.

Some WordPress reset plugins, such as WP Reset or Advanced WordPress Reset, might assist you with the reset process. You can also seek assistance from your WordPress host.

Please keep in mind that we only advocate this strategy for fresh WordPress blogs with little data.

5. Make Yourself The Site Administrator

Another possible reason behind getting the “Sorry you are not allowed to access this page” error is that your user role has been altered mistakenly and you are no longer labeled as an Administrator. This is a frequent issue with multisite installs. To find out if this is the case, go to phpMyAdmin and check for the wp users table:

Sorry You Are Not Allowed to Access This Page

Find your username and make a note of your ID. Then, go to the wp_usermeta table and look for the wp capabilities row:

Sorry You Are Not Allowed to Access This Page

If the wp_usermeta table says anything you are not the administrator, you can update it by clicking the Edit link. Alternatively, you may use phpMyAdmin to establish a whole new Administrator account.

Bonus: Easily Solve “You Have Been Locked Out” Error In WordPress

Sorry You Are Not Allowed to Access This Page

Have you ever had your WordPress site locked out? It’s a typical problem that practically every WordPress user has encountered at some point. It may be really aggravating. In this post about “How To Solve ‘You Have Been Locked Out’ Error In WordPress”  you can get an easy idea of what causes the frustrating ‘Locked Out’ error on your WordPress website and how you can easily repair it by employing some brilliant tricks.

As a WordPress site owner, you must also assure your site’s security and maintenance on a regular basis in order for it to run properly. By simply backing up your WordPress website beforehand, even if you find a serious problem with the site, you can easily restore the previous version and go back to work.

So, what do you think about this article? Feel free to share your thoughts in the comments below. Subscribe to our blog page and join our Facebook community for more exciting updates. 

Razthee Md. Yakini

Razthee Md. Yakini

Razthee Md. Yakini loves to write and read anything no matter the topic. He has a passion for becoming a content creator on WordPress. Razthee is a CSE graduate from United International University. His hobby is playing multiplayer games, reading horror sci-fi books, and watching gangster movies.

Share This Story

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.