There are few situations more alarming than being locked out of your own WordPress admin dashboard. If you've encountered a bulletin reading "Sorry, you are not allowed to access this page" when trying to log in, you lot know the feeling first hand.

Fortunately, there are several solutions at your disposal for troubleshooting this error. With a little patience, you lot can articulate upwards the mistake and get back to managing your WordPress site in no time.

In this post, we'll dig into the "Sorry, you are not allowed to access this page" error and what causes it to occur. Then nosotros'll walk you lot through the many potential solutions to assist you discover the one that addresses your specific situation.

Let'south jump correct in!

Understanding the "Sorry, You Are Not Allowed to Access This Page" Error

Although we're referring to it as an "error" for the purposes of this post, the "Sorry, you are not allowed to access this folio" message in WordPress is meant to be a helpful security measure.

Ultimately, seeing this notification simply means there'due south a permissions setting that's blocking you from a certain area.

This becomes a trouble when you're locked out of a role of your site that you should accept permission to enter which, equally an Administrator, is anywhere on the backend. When this situation arises, it is often following a recent update to a theme, plugin, or WordPress cadre.

You may see the "Sorry, yous are non allowed to access this page" bulletin for a multifariousness of reasons. It might be that WordPress doesn't recognize you as an Administrator. In other situations, the data contained in your site'due south core code or in a theme or plugin may not match what's in your database.

Boosted causes include incorrect data in your wp-config.php file or a site that's running an outdated version of PHP. Whatever the source, this error may prevent yous from accessing the entire admin area or just a portion of it.

Since it's likely that you volition non exist able to admission key settings via the dashboard, you'll need to use File Transfer Protocol (FTP) or phpMyAdmin to resolve this consequence. Make sure to support your site and castor upwards on using these platforms before you dive into the troubleshooting process.

The most frustrating thing about encountering the "Sad, you are not allowed to access this page" notification is that it tin can be hard to pin down which of its causes are at play. Fortunately, there are many solutions y'all can test out to find the root of the problem.

How to Fix the "Sorry, You lot Are Non Immune to Access This Page" Mistake in WordPress (11 Potential Solutions)

Due to its many possible causes, the "Sorry, yous are not allowed to access this folio" mistake takes quite a bit of patience to resolve. This long list of solutions may be intimidating but it also covers a diverseness of situations to help you detect the right i for your site.

1. Restore a Previous Version of Your Site

The simplest and often the fastest way to get back into your WordPress dashboard is to restore your site to an earlier version. A recent change, such equally an update, might exist the cause of the error you're seeing. Undoing your latest modification should enable you to access your site again.

Kinsta clients accept information technology easy in this regard. You tin restore a WordPress backup in your hosting account with a unmarried click:

Restoring a backup in MyKinsta
Restoring a backup in MyKinsta

The drawback to this solution is that y'all may lose your recent changes and volition have to notice a way to accomplish your goals without causing the same error again.

For this reason, y'all may want to restore your backup to a staging site instead. You can then exam dissimilar modifications to decide what caused the problem. After uncovering the root of the effect, you tin undo the troublesome alter to regain access to your site.

2. Disable All of Your Plugins

A specific change that may be causing the "Pitiful, you are not allowed to access this page" message on your site is the recent add-on or upgrade of a plugin. If you suspect that this is the case, your best grade of activity is to disable your plugins one past one.

In the effect that you disable a plugin and the message goes away, you lot've found the source of the problem. You tin can then troubleshoot the effect with that plugin (or do without it, if it's not crucial to your site's functionality).

Of class, if yous're locked out of your dashboard entirely, this process gets a piddling tricky. Y'all'll need to access your site using SFTP via a client such as FileZilla. Once yous've washed so, navigate to wp-content and find the sub-directory labeled plugins:

Disable all plugins by renaming the folder
Disable all plugins by renaming the binder

Enter this folder, and then rename your most recently-added plugin to something similar "plugin-name_old". Go dorsum to your site and check to see if the error is resolved. If not, modify the plugin'southward name dorsum and repeat the process with the next ane.

3. Activate a Default Theme

Yet another potential cause of this error is that you've recently updated or installed a theme. Your best bet for resolving this problem is to activate a default WordPress theme such as Twenty 20 or Twenty Nineteen.

To do so without access to your admin area, you'll need to use FTP over again. Connect to your server with FileZilla and then navigate to wp-content > themes:

Disable your current theme by renaming the folder
Disable your current theme by renaming the folder

The rest of the process is adequately similar to the 1 described in a higher place for disabling your plugins.

Rename the folder for your agile theme, and and then return to your site and log in. You should see a notification telling yous that the active theme is cleaved, and a default theme has been reactivated.

Then you tin can troubleshoot the theme. Your site should at least be attainable, albeit with the wrong theme activated.

4. Brand Certain You're an Administrator

Another possibility is that your user part has been inadvertently changed and you are no longer listed as an Ambassador. This is a common problem with multisite installations. To make up one's mind if this is the example, you'll need to access phpMyAdmin and look for the wp_users tabular array:

The WP users table
The wp_users tabular array in phpMyAdmin

Discover your username and note your ID. Then, navigate to the wp_usermeta tabular array and observe the wp_capabilties row:

The wp_usermeta table in phpMyAdmin
The wp_usermeta tabular array in phpMyAdmin

If you have Administrator privileges, the meta_value in this row will read:

a:1:{s:13:"administrator";southward:one:"1";}

If your wp_usermeta tabular array says something else, y'all can click on the Edit link and change information technology. Alternatively, you can also create an entirely new Administrator account from phpMyAdmin. To take this road, return to the wp_users table and click on the Insert tab at the top of the table:

Change user information in wp_users table
Modify user information in wp_users table

Then, fill in the fields with your new user data. Once you're done, click on the Get button and your new user should announced in the tabular array. 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 post-obit information:

  • Unmeta_id: Exit this field blank; it will be filled in automatically for y'all.
  • User_id: Use the ID from the WP Users table.
  • Meta_key: Prepare this value as "wp_capabilities".
  • Meta_value: Add the line mentioned to a higher place.

Y'all should now be able to use your new credentials to log in to your WordPress admin area. Delete your quondam business relationship or change its user role back to Ambassador from the dashboard and delete the new ane instead.

Subscribe Now

five. Bank check Your Error Log to Pinpoint the Cause

A smart style to streamline troubleshooting whatever problem on your site is to bank check your server's error log. This may point plugin or theme compatibility issues, database errors, or bug with your site's files that are causing the "Pitiful, you are non immune to access this page" message to announced.

How you view your server'south error log will vary depending on who your hosting provider is. For Kinsta customers, this procedure is every bit elementary as logging into your MyKinsta dashboard. At that place, select the site that's experiencing problems and navigate to Logs:

MyKinsta logs tab
MyKinsta logs tab

Choose error.log from the drop-down menu. If you come across ane of the causes of the alert in your log, then you can get nigh fixing it. Otherwise, y'all'll need to try another solution on this list.

6. Ensure That Your Database Prefix Is Correct

Every MySQL database has a prefix. If this 1 listed in your website'due south files doesn't match the i listed in phpMyAdmin, and then you may come across the "Lamentable, you are not allowed to access this page" bulletin.

This can occur when migrating your site, including if you've used a local staging site for evolution and are now moving to a live server. To cheque for discrepancies, you'll need to access your wp-config.php file.

Y'all can do this via SFTP equally we've described in previous solutions. In one case you're in your wp-config.php file, you should expect for your database's prefix (the default is "wp_"):

Database prefix
Database prefix

Then, log in to phpMyAdmin and wait at the prefixes for your database's tables. They should match the ones listed in your wp-config.php file, like in the image below:

Prefixes should match those in your wp-config.php file
Prefixes should match those in your wp-config.php file

If they don't match the prefix in your wp-config.php file, so y'all'll need to edit it so that they practice.

vii. Look for Changes in Your wp-config.php File

On a similar annotation, you lot should also look for any changes to your WordPress configuration file. This is specially true if y'all were editing this file soon earlier you received the "Sorry, you are not allowed to access this folio" message or if yous suspect that your WordPress site has been hacked.

You can access your wp-config.php file using SFTP and look for anything that seems amiss. However, this process is much easier if y'all have some kind of file integrity monitoring or alter detection feature in place.

8. Upgrade to the Latest Version of PHP

If your WordPress site is running an outdated version of PHP, this could exist the source of your troubles. With that said, fifty-fifty if upgrading PHP doesn't solve this issue for you, information technology should improve your site'southward overall security and performance.

Before y'all start the upgrade process, create a backup of your site. You can practice this manually or from your MyKinsta dashboard, even if you're locked out of your admin surface area. Once you lot've saved your fill-in, you'll want to test to meet whether your business relationship is compatible with the latest version of PHP. 1 fashion to practise this is with a WordPress staging site.

Bold that all goes well, you can run the update. Kinsta customers tin easily do so past logging into the MyKinsta dashboard and navigating to the relevant site. Then go to Tools > PHP Engine > Change, and select the newest version from the drop-down menu:

How to upgrade PHP version in MyKinsta
How to upgrade PHP version in MyKinsta

If you're with another provider, you may be able to follow a similar process via your own command panel. It'due south recommended that you contact your web host for more than information.

nine. Evaluate Your File Permissions

It'due south besides possible that your site's file permissions accept been tampered with. In this case, WordPress may consider you lot unauthorized to view certain areas of your site, even if you're still listed equally an Ambassador.

To check your site'due south file permissions, you'll need to use SFTP to access your server. Once you're logged in, enter the public_html directory and bulk-select wp-admin, wp-content, and wp -includes. Right-click on these folders and choose File Permissions:

Checking file permissions
Checking file permissions

In the resulting window, brand certain the following options are selected:

  • The Numeric Value is set to 755.
  • Recurse into subdirectories is checked.
  • Employ to directories only is selected.

Click on OK when you lot're washed. And then, highlight all the other files in public_html, right-click on them, and select File Permissions again:

Setting new file permissions
Setting new file permissions

This time, set the options in the permissions window to the following:

  • The Numeric Value should exist 644.
  • Recurse into subdirectories should nevertheless be checked.
  • Employ to files only should be selected.

And so, return to your site to meet if this solves the problem and the "Pitiful, you are not allowed to access this page" message is gone.

x. Create a New .htaccess File

If none of the above strategies have worked, yous may need to reset your .htaccess file. To do and so, launch FTP and navigate to your public_html folder. You should run across your .htaccess file at that place, but if you don't, follow instructions for showing hidden files in FileZilla.

Next, you lot'll need to rename your existing .htaccess file, like to how we renamed plugin and theme files in before solutions. Something recognizable such as .htaccess_original or .htaccess_backup is platonic.

And so, right-click on the file and select Download. Open the file in a text editor and supercede its contents with the following:

          #Begin WordPress  RewriteEngine On  RewriteBase /  RewriteRule ^index\.php$ - [L]  RewriteCond %{REQUEST_FILENAME} !-f  RewriteCOnd %{REQUEST_FILENAME} !-d  RewriteRule . /index.php [L]  #END WordPress        

Rename this file .htaccess and upload it to your server. If this file was the source of the "Sorry, you are not allowed to access this folio" error, so it should at present be fixed.

11. Reset Your WordPress Site

In the worst-case scenario, in that location may exist an installation outcome. To fix it, you lot'll have to reset your WordPress site. It's vital that you have a contempo backup you can restore later this process is complete, as resetting your site will cause you lot to lose all posts, pages, and user comments.

In that location are several methods for doing this, including via your MyKinsta dashboard, using a WordPress plugin, and by using WP-CLI (the WordPress command line). Information technology's best to save this road equally a terminal resort, then you don't hazard losing your site'southward content.

Are y'all getting the awfully alarming *Distressing, Y'all Are Not Allowed to Access This Page* message? Try i of these methods to become your access back! đź™…‍♂️🔑 Click to Tweet

Summary

Existence locked out of your admin dashboard in WordPress is nervus-wracking, to say the to the lowest degree. Quickly finding the right solution to the "Deplorable, you lot are not allowed to admission this page" error is vital to both your site and your peace of mind.

In this post, we covered a wide range of possible causes and fixes for this issue. Let's recap them quickly:

  1. Restore a previous version of your site.
  2. Disable all of your plugins.
  3. Activate a default theme.
  4. Brand certain you're an administrator.
  5. Check your mistake log to pinpoint the cause.
  6. Ensure that your database prefix is correct.
  7. Look for changes in your wp-config.php file.
  8. Upgrade to the latest version of php.
  9. Evaluate your file permissions.
  10. Create a new .htaccess file.
  11. Reset your WordPress site.

Happy fixing!


Save fourth dimension, costs and maximize site performance with:

  • Instant help from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audience reach with 29 information centers worldwide.
  • Optimization with our born Application Operation Monitoring.

All of that and much more, in one plan with no long-term contracts, assisted migrations, and a xxx-twenty-four hour period-coin-dorsum-guarantee. Check out our plans or talk to sales to observe the program that'due south right for you.