There are few situations more alarming than being locked out of your ain WordPress admin dashboard. If you've encountered a message reading "Sorry, you are non immune to access this folio" when trying to log in, y'all know the feeling start hand.

Fortunately, in that location are several solutions at your disposal for troubleshooting this error. With a piffling patience, you tin can articulate up the mistake and go back to managing your WordPress site in no time.

In this mail service, nosotros'll dig into the "Pitiful, yous are not allowed to admission this page" fault and what causes it to occur. Then nosotros'll walk yous through the many potential solutions to assist you find the 1 that addresses your specific situation.

Let'due south spring right in!

Agreement the "Sorry, You Are Not Allowed to Admission This Page" Error

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

Ultimately, seeing this notification simply means there's a permissions setting that's blocking you lot from a sure area.

This becomes a problem when yous're locked out of a function of your site that you should have 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 core.

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

Additional causes include wrong information in your wp-config.php file or a site that's running an outdated version of PHP. Whatever the source, this fault may forestall you from accessing the entire admin surface area or just a portion of it.

Since information technology's probable that you volition not exist able to access primal settings via the dashboard, you'll need to utilize File Transfer Protocol (FTP) or phpMyAdmin to resolve this issue. Brand sure to support your site and brush up on using these platforms earlier y'all dive into the troubleshooting process.

The most frustrating thing about encountering the "Pitiful, you are not immune to access this page" notification is that it can be hard to pin downward which of its causes are at play. Fortunately, in that location are many solutions you lot can test out to observe the root of the trouble.

How to Fix the "Sorry, Y'all Are Not Allowed to Access This Page" Error in WordPress (11 Potential Solutions)

Due to its many possible causes, the "Sorry, you lot are non allowed to admission this page" mistake takes quite a bit of patience to resolve. This long list of solutions may be intimidating but it also covers a multifariousness of situations to assist you find the right one for your site.

1. Restore a Previous Version of Your Site

The simplest and oftentimes the fastest way to get back into your WordPress dashboard is to restore your site to an before version. A contempo change, such as an update, might be the cause of the error you lot're seeing. Undoing your latest modification should enable you lot to access your site again.

Kinsta clients have it easy in this regard. You tin can restore a WordPress backup in your hosting business relationship with a unmarried click:

Restoring a backup in MyKinsta
Restoring a backup in MyKinsta

The drawback to this solution is that you may lose your recent changes and volition have to find a way to reach your goals without causing the same fault over again.

For this reason, y'all may desire to restore your backup to a staging site instead. You can then test different modifications to make up one's mind what caused the trouble. After uncovering the root of the consequence, you can undo the troublesome change to regain access to your site.

two. Disable All of Your Plugins

A specific alter that may be causing the "Sorry, you lot are not immune to access this page" bulletin on your site is the recent addition or upgrade of a plugin. If you suspect that this is the case, your all-time course of action is to disable your plugins one past 1.

In the event that you disable a plugin and the message goes abroad, you've found the source of the problem. You can so troubleshoot the issue with that plugin (or practise without it, if it's not crucial to your site's functionality).

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

Disable all plugins by renaming the folder
Disable all plugins past renaming the folder

Enter this binder, and and then rename your most recently-added plugin to something similar "plugin-name_old". Go back to your site and bank check to come across if the error is resolved. If not, change the plugin'southward proper noun dorsum and repeat the procedure with the next one.

iii. 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 20 Twenty or Twenty Nineteen.

To practise and then without access to your admin area, you'll need to use FTP 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 above for disabling your plugins.

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

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

4. Make Certain You're an Administrator

Another possibility is that your user office has been inadvertently changed and y'all are no longer listed equally an Administrator. This is a common problem with multisite installations. To determine if this is the case, yous'll demand to access phpMyAdmin and look for the wp_users table:

The WP users table
The wp_users table in phpMyAdmin

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

The wp_usermeta table in phpMyAdmin
The wp_usermeta table in phpMyAdmin

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

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

If your wp_usermeta table says something else, you can click on the Edit link and change it. Alternatively, you can also create an entirely new Ambassador business relationship from phpMyAdmin. To take this route, 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
Change user information in wp_users table

Then, fill in the fields with your new user information. Once you're washed, click on the Go button and your new user should appear in the table. Adjacent, you'll demand to make a notation 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 following information:

  • Unmeta_id: Leave this field blank; information technology will be filled in automatically for you.
  • User_id: Use the ID from the WP Users table.
  • Meta_key: Gear up this value as "wp_capabilities".
  • Meta_value: Add the line mentioned above.

Yous should at present be able to apply your new credentials to log in to your WordPress admin surface area. Delete your sometime business relationship or change its user role back to Administrator from the dashboard and delete the new one instead.

Subscribe At present

5. Cheque Your Error Log to Pinpoint the Crusade

A smart way to streamline troubleshooting any problem on your site is to check your server'southward error log. This may point plugin or theme compatibility bug, database errors, or problems with your site's files that are causing the "Sorry, you are non allowed to access this page" message to announced.

How yous view your server's error log will vary depending on who your hosting provider is. For Kinsta customers, this process is equally simple as logging into your MyKinsta dashboard. There, select the site that's experiencing problems and navigate to Logs:

MyKinsta logs tab
MyKinsta logs tab

Cull error.log from the drop-downward menu. If you run across one of the causes of the alert in your log, then y'all can go about fixing information technology. Otherwise, you'll need to endeavor another solution on this list.

6. Ensure That Your Database Prefix Is Correct

Every MySQL database has a prefix. If this one listed in your website'south files doesn't match the one listed in phpMyAdmin, and so you may see the "Sorry, you are not allowed to access this folio" message.

This tin can occur when migrating your site, including if you lot've used a local staging site for development and are now moving to a alive server. To check for discrepancies, y'all'll need to access your wp-config.php file.

You can practice this via SFTP as nosotros've described in previous solutions. One time 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 expect at the prefixes for your database'due south 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 lucifer those in your wp-config.php file

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

seven. Expect for Changes in Your wp-config.php File

On a like note, y'all should also wait for any changes to your WordPress configuration file. This is especially true if you were editing this file soon before you received the "Sorry, you are not allowed to access this page" bulletin or if you suspect that your WordPress site has been hacked.

You can access your wp-config.php file using SFTP and expect for anything that seems amiss. However, this procedure is much easier if you accept some kind of file integrity monitoring or change detection feature in place.

viii. Upgrade to the Latest Version of PHP

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

Before y'all kickoff the upgrade procedure, create a fill-in of your site. You tin do this manually or from your MyKinsta dashboard, even if you lot're locked out of your admin area. Once y'all've saved your backup, you'll want to examination to see whether your account is compatible with the latest version of PHP. One mode to do this is with a WordPress staging site.

Assuming that all goes well, you tin can run the update. Kinsta customers tin easily practise then by 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-downwards menu:

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

If you're with some other provider, you may be able to follow a similar process via your ain control panel. It's recommended that you contact your web host for more information.

ix. Evaluate Your File Permissions

It'southward as well possible that your site'south file permissions take been tampered with. In this case, WordPress may consider yous unauthorized to view sure areas of your site, fifty-fifty if you're still listed equally an Administrator.

To check your site's file permissions, yous'll need to use SFTP to access your server. One time you lot're logged in, enter the public_html directory and majority-select wp-admin, wp-content, and wp -includes. Correct-click on these folders and choose File Permissions:

Checking file permissions
Checking file permissions

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

  • The Numeric Value is set to 755.
  • Recurse into subdirectories is checked.
  • Apply to directories but is selected.

Click on OK when you're done. Then, highlight all the other files in public_html, correct-click on them, and select File Permissions over again:

Setting new file permissions
Setting new file permissions

This fourth dimension, set the options in the permissions window to the following:

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

And then, return to your site to run into if this solves the problem and the "Sorry, you are not allowed to admission this page" message is gone.

10. Create a New .htaccess File

If none of the to a higher place strategies accept worked, you may need to reset your .htaccess file. To do so, launch FTP and navigate to your public_html binder. You should see your .htaccess file there, but if you lot don't, follow instructions for showing hidden files in FileZilla.

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

Then, right-click on the file and select Download. Open the file in a text editor and supervene upon its contents with the following:

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

Rename this file .htaccess and upload it to your server. If this file was the source of the "Pitiful, yous are non immune to access this page" error, then information technology should now be fixed.

11. Reset Your WordPress Site

In the worst-case scenario, there may be an installation issue. To fix it, y'all'll have to reset your WordPress site. Information technology's vital that you have a recent backup you can restore later on this procedure is complete, as resetting your site will cause you to lose all posts, pages, and user comments.

There are several methods for doing this, including via your MyKinsta dashboard, using a WordPress plugin, and by using WP-CLI (the WordPress control line). It's all-time to salvage this road as a last resort, and then yous don't chance losing your site'southward content.

Are you lot getting the awfully alarming *Sorry, You Are Not Immune to Access This Page* message? Try one of these methods to go your access dorsum! 🙅‍♂️🔑 Click to Tweet

Summary

Existence locked out of your admin dashboard in WordPress is nerve-wracking, to say the least. Quickly finding the correct solution to the "Sorry, yous are not immune to access this folio" mistake is vital to both your site and your peace of listen.

In this post, we covered a broad range of possible causes and fixes for this issue. Permit's epitomize them rapidly:

  1. Restore a previous version of your site.
  2. Disable all of your plugins.
  3. Activate a default theme.
  4. Make sure y'all're an administrator.
  5. Cheque your error 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!


Salve time, costs and maximize site performance with:

  • Instant assist from WordPress hosting experts, 24/seven.
  • Cloudflare Enterprise integration.
  • Global audience reach with 29 data centers worldwide.
  • Optimization with our built-in Awarding Performance Monitoring.

All of that and much more, in ane programme with no long-term contracts, assisted migrations, and a 30-day-money-back-guarantee. Check out our plans or talk to sales to notice the plan that's correct for you.