At that place are few situations more alarming than existence locked out of your own WordPress admin dashboard. If you've encountered a message reading "Sorry, you lot are not allowed to admission this page" when trying to log in, yous know the feeling first hand.

Fortunately, in that location are several solutions at your disposal for troubleshooting this fault. With a petty patience, you lot can clear up the mistake and get back to managing your WordPress site in no time.

In this mail, we'll dig into the "Sorry, y'all are not immune to access this page" mistake and what causes it to occur. So we'll walk you through the many potential solutions to assistance you find the i that addresses your specific situation.

Let's bound right in!

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

Although nosotros're referring to it equally an "error" for the purposes of this mail service, the "Deplorable, you are not immune to admission this folio" 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 certain area.

This becomes a problem when yous're locked out of a office of your site that you should have permission to enter which, as an Administrator, is anywhere on the backend. When this situation arises, it is often following a contempo update to a theme, plugin, or WordPress cadre.

You may run into the "Pitiful, you are non allowed to access this page" message for a diverseness of reasons. It might exist that WordPress doesn't recognize you as an Ambassador. In other situations, the information contained in your site's core lawmaking or in a theme or plugin may not lucifer what's in your database.

Boosted causes include incorrect information in your wp-config.php file or a site that'southward running an outdated version of PHP. Any the source, this fault may preclude yous from accessing the unabridged admin area or just a portion of it.

Since it'due south likely that yous will non exist able to admission primal settings via the dashboard, you lot'll need to utilise File Transfer Protocol (FTP) or phpMyAdmin to resolve this issue. Make sure to back up your site and brush up on using these platforms before you dive into the troubleshooting procedure.

The most frustrating thing nigh encountering the "Distressing, you are not allowed to access this page" notification is that it can be difficult to pin down which of its causes are at play. Fortunately, in that location are many solutions y'all can test out to detect the root of the problem.

How to Fix the "Sorry, You lot Are Not Allowed to Admission This Page" Fault in WordPress (11 Potential Solutions)

Due to its many possible causes, the "Distressing, you are not allowed to admission this page" fault takes quite a fleck of patience to resolve. This long list of solutions may be intimidating but information technology also covers a diverseness of situations to help you observe the right ane for your site.

1. Restore a Previous Version of Your Site

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

Kinsta clients have it piece of cake in this regard. You can restore a WordPress fill-in in your hosting account with a single click:

Restoring a backup in MyKinsta
Restoring a fill-in in MyKinsta

The drawback to this solution is that you may lose your recent changes and will take to find a way to reach your goals without causing the same error once again.

For this reason, you may want to restore your backup to a staging site instead. Y'all tin then test different modifications to determine what caused the problem. Afterwards uncovering the root of the outcome, yous can undo the troublesome alter to regain access to your site.

ii. Disable All of Your Plugins

A specific modify that may be causing the "Sorry, you are non allowed to access this page" message on your site is the recent addition or upgrade of a plugin. If you suspect that this is the case, your best grade of action is to disable your plugins one by one.

In the event that yous disable a plugin and the message goes away, you've plant the source of the problem. You can and then troubleshoot the consequence with that plugin (or do without it, if it'south non crucial to your site's functionality).

Of course, if you're locked out of your dashboard entirely, this process gets a little catchy. You'll need to admission your site using SFTP via a client such as FileZilla. Once you'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 folder

Enter this folder, then rename your nigh recently-added plugin to something like "plugin-name_old". Go back to your site and check to see if the error is resolved. If not, change the plugin'south name back and echo the process with the adjacent ane.

three. Activate a Default Theme

Yet some other potential cause of this fault is that yous've recently updated or installed a theme. Your best bet for resolving this problem is to activate a default WordPress theme such every bit 20 20 or 20 Nineteen.

To practise then without admission to your admin area, yous'll need to use FTP once again. Connect to your server with FileZilla and and then navigate to wp-content > themes:

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

The residual of the process is fairly similar to the one described above for disabling your plugins.

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

So you tin troubleshoot the theme. Your site should at least be accessible, admitting with the wrong theme activated.

4. Brand Certain Y'all're an Administrator

Some other possibility is that your user function has been inadvertently changed and you are no longer listed as an Administrator. This is a mutual problem with multisite installations. To determine if this is the example, y'all'll demand to access phpMyAdmin and await for the wp_users table:

The WP users table
The wp_users table in phpMyAdmin

Find your username and annotation your ID. Then, navigate to the wp_usermeta table and find the wp_capabilties row:

The wp_usermeta table in phpMyAdmin
The wp_usermeta table in phpMyAdmin

If y'all accept Ambassador privileges, the meta_value in this row will read:

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

If your wp_usermeta table says something else, y'all tin can click on the Edit link and change it. Alternatively, you can also create an entirely new Administrator business relationship from phpMyAdmin. To accept 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

And then, fill in the fields with your new user data. Once you're done, click on the Become button and your new user should appear in the table. Adjacent, you'll need to brand a note of the ID for this account and head dorsum to the wp_usermeta table.

Click on Insert once more, and fill in the resulting fields with the post-obit information:

  • Unmeta_id: Leave this field blank; it will be filled in automatically for yous.
  • User_id: Use the ID from the WP Users table.
  • Meta_key: Set this value every bit "wp_capabilities".
  • Meta_value: Add the line mentioned to a higher place.

You should at present be able to apply your new credentials to log in to your WordPress admin expanse. Delete your quondam account or change its user part back to Administrator from the dashboard and delete the new one instead.

Subscribe Now

5. Bank check Your Error Log to Pinpoint the Crusade

A smart way to streamline troubleshooting any problem on your site is to bank check your server'due south error log. This may indicate plugin or theme compatibility issues, database errors, or issues with your site'southward files that are causing the "Deplorable, yous are not immune to access this page" message to appear.

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

MyKinsta logs tab
MyKinsta logs tab

Choose error.log from the drop-down menu. If you see ane of the causes of the alarm in your log, and so y'all tin go about fixing it. Otherwise, you'll demand 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 friction match the one listed in phpMyAdmin, and so you may see the "Sad, yous are not allowed to access this page" message.

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 bank check for discrepancies, you'll need to access your wp-config.php file.

You can do this via SFTP every bit nosotros've described in previous solutions. Once you're in your wp-config.php file, yous should look for your database's prefix (the default is "wp_"):

Database prefix
Database prefix

And so, log in to phpMyAdmin and expect at the prefixes for your database's tables. They should lucifer 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, then you lot'll need to edit information technology so that they do.

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

On a like note, you should likewise expect for whatsoever changes to your WordPress configuration file. This is especially truthful if y'all were editing this file shortly earlier y'all received the "Sorry, you are non allowed to access this page" bulletin or if you suspect that your WordPress site has been hacked.

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

8. 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 y'all, it should improve your site's overall security and performance.

Before you start the upgrade process, create a backup of your site. You tin practice this manually or from your MyKinsta dashboard, even if you're locked out of your admin expanse. One time you've saved your backup, you'll want to test to see whether your account is compatible with the latest version of PHP. One way to practise this is with a WordPress staging site.

Assuming that all goes well, you can run the update. Kinsta customers can easily do and then by logging into the MyKinsta dashboard and navigating to the relevant site. Then get to Tools > PHP Engine > Modify, 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 like process via your own control panel. It's recommended that yous contact your web host for more information.

9. Evaluate Your File Permissions

It's also possible that your site's file permissions have been tampered with. In this case, WordPress may consider you unauthorized to view certain areas of your site, even if you lot're notwithstanding listed as an Administrator.

To check your site'south file permissions, you'll need to use SFTP to admission your server. In one case you'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, make certain the post-obit options are selected:

  • The Numeric Value is fix to 755.
  • Recurse into subdirectories is checked.
  • Apply to directories only is selected.

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

Setting new file permissions
Setting new file permissions

This time, ready the options in the permissions window to the post-obit:

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

Then, return to your site to see if this solves the problem and the "Sorry, you are non allowed to access this page" bulletin is gone.

10. Create a New .htaccess File

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

Adjacent, you'll need to rename your existing .htaccess file, similar to how nosotros 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 up the file in a text editor and replace its contents with the following:

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

Rename this file .htaccess and upload it to your server. If this file was the source of the "Sorry, you lot are non allowed to access this page" error, and then it should now be fixed.

11. Reset Your WordPress Site

In the worst-case scenario, at that place may be an installation issue. To fix it, you'll have to reset your WordPress site. It'due south vital that yous have a recent backup you can restore afterward this process is complete, as resetting your site will crusade yous 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'due south best to save this route as a last resort, so you don't gamble losing your site'southward content.

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

Summary

Being locked out of your admin dashboard in WordPress is nerve-wracking, to say the least. Rapidly finding the correct solution to the "Lamentable, you are not allowed to admission this page" mistake is vital to both your site and your peace of heed.

In this postal service, nosotros covered a wide range of possible causes and fixes for this effect. Let'southward epitomize them chop-chop:

  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. Check 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!


Salvage time, costs and maximize site operation with:

  • Instant assistance from WordPress hosting experts, 24/7.
  • Cloudflare Enterprise integration.
  • Global audition reach with 29 information centers worldwide.
  • Optimization with our congenital-in Application Functioning Monitoring.

All of that and much more than, in one programme with no long-term contracts, assisted migrations, and a 30-day-money-dorsum-guarantee. Check out our plans or talk to sales to find the plan that'due south right for you.