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

Fortunately, there are several solutions at your disposal for troubleshooting this mistake. With a trivial patience, you tin can clear upward the mistake and become back to managing your WordPress site in no time.

In this post, nosotros'll dig into the "Lamentable, you are non allowed to access this page" error and what causes information technology to occur. And so we'll walk y'all through the many potential solutions to help yous find the ane that addresses your specific state of affairs.

Permit'due south jump correct in!

Understanding the "Sorry, You Are Non Immune to Access This Page" Error

Although nosotros're referring to information technology as an "mistake" for the purposes of this post, the "Sorry, you are non immune to access this folio" bulletin in WordPress is meant to be a helpful security measure.

Ultimately, seeing this notification but means at that place's a permissions setting that's blocking you from a certain area.

This becomes a problem when you're locked out of a part 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 oft following a recent update to a theme, plugin, or WordPress core.

Y'all may see the "Sorry, you are not allowed to access this page" message for a variety of reasons. It might exist that WordPress doesn't recognize yous as an Administrator. In other situations, the information contained in your site'south core lawmaking or in a theme or plugin may non friction match what'due south in your database.

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

Since information technology'south probable that y'all will non be able to access cardinal settings via the dashboard, you'll need to employ File Transfer Protocol (FTP) or phpMyAdmin to resolve this upshot. Make sure to back up your site and castor upwards on using these platforms before yous dive into the troubleshooting process.

The most frustrating thing virtually encountering the "Sad, you are not allowed to access this page" notification is that it tin be hard to pin down which of its causes are at play. Fortunately, in that location are many solutions you can exam out to detect the root of the trouble.

How to Fix the "Distressing, You Are Non Immune to Access This Folio" Fault in WordPress (eleven Potential Solutions)

Due to its many possible causes, the "Lamentable, y'all are non allowed to access this page" fault takes quite a scrap of patience to resolve. This long list of solutions may be intimidating but it also covers a diverseness of situations to help you find the right one for your site.

1. Restore a Previous Version of Your Site

The simplest and often the fastest style to get back into your WordPress dashboard is to restore your site to an earlier version. A recent modify, such as an update, might be the cause of the error y'all're seeing. Undoing your latest modification should enable yous to access your site again.

Kinsta clients have information technology like shooting fish in a barrel in this regard. You can 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 will have to find a fashion to accomplish your goals without causing the aforementioned error once again.

For this reason, you may want to restore your backup to a staging site instead. You lot tin can then examination unlike modifications to decide what caused the problem. Later uncovering the root of the upshot, you tin can undo the troublesome modify to regain access to your site.

two. Disable All of Your Plugins

A specific alter that may be causing the "Lamentable, you are not immune to access this folio" bulletin on your site is the contempo 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 by one.

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

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

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

Enter this folder, and and so rename your most recently-added plugin to something like "plugin-name_old". Get back to your site and check to meet if the error is resolved. If not, change the plugin'southward name back and echo the procedure with the next i.

3. Activate a Default Theme

Yet another potential crusade of this mistake is that you've recently updated or installed a theme. Your all-time bet for resolving this problem is to activate a default WordPress theme such as Twenty Xx or Twenty Nineteen.

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

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

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

Rename the folder for your agile 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 can troubleshoot the theme. Your site should at least be accessible, admitting with the wrong theme activated.

four. Make Sure You're an Administrator

Some other possibility is that your user role 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 instance, you'll demand to admission phpMyAdmin and look 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 tabular array in phpMyAdmin

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

a:ane:{s:13:"ambassador";south:1:"1";}

If your wp_usermeta table says something else, you lot can click on the Edit link and alter it. Alternatively, you can likewise create an entirely new Administrator account 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 data in wp_users table

Then, fill in the fields with your new user information. Once you're done, click on the Get push button and your new user should appear in the table. 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 following information:

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

You should now be able to use your new credentials to log in to your WordPress admin area. Delete your former account or change its user office back to Ambassador from the dashboard and delete the new one instead.

Subscribe Now

5. Cheque Your Error Log to Pinpoint the Cause

A smart fashion to streamline troubleshooting any problem on your site is to check your server's error log. This may point plugin or theme compatibility issues, database errors, or problems with your site's files that are causing the "Sorry, you lot are not allowed to access this page" bulletin to appear.

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

MyKinsta logs tab
MyKinsta logs tab

Choose fault.log from the drib-downwardly carte du jour. If you see ane of the causes of the alert in your log, then you lot can get most fixing it. Otherwise, you'll demand to endeavor another solution on this listing.

vi. Ensure That Your Database Prefix Is Correct

Every MySQL database has a prefix. If this one listed in your website's files doesn't lucifer the one listed in phpMyAdmin, so y'all may encounter the "Sorry, you 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 development and are now moving to a alive server. To cheque for discrepancies, you'll need to access your wp-config.php file.

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

Database prefix
Database prefix

Then, log in to phpMyAdmin and look at the prefixes for your database's tables. They should match the ones listed in your wp-config.php file, like in the prototype 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, then you'll need to edit it so that they do.

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

On a similar annotation, you should also look for any changes to your WordPress configuration file. This is especially true if yous were editing this file shortly before you received the "Deplorable, you are not allowed to access this page" message or if you suspect that your WordPress site has been hacked.

You tin access your wp-config.php file using SFTP and look for annihilation that seems amiss. Even so, this process is much easier if y'all take some kind of file integrity monitoring or change detection characteristic 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 result for you, it should improve your site'due south overall security and performance.

Before you offset the upgrade process, create a fill-in of your site. Yous can do this manually or from your MyKinsta dashboard, even if you're locked out of your admin surface area. Once you've saved your backup, y'all'll want to exam to encounter 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 tin run the update. Kinsta customers tin easily practice so 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 drib-downwardly menu:

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

If y'all're with another provider, you may be able to follow a similar process via your own control panel. Information technology's recommended that you contact your web host for more information.

9. Evaluate Your File Permissions

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

To check your site's file permissions, you'll need to use SFTP to admission your server. In one case yous're logged in, enter the public_html directory and bulk-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 sure the following options are selected:

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

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

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 nevertheless exist checked.
  • Apply to files merely should be selected.

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

10. Create a New .htaccess File

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

Next, you'll need to rename your existing .htaccess file, similar to how we renamed plugin and theme files in before solutions. Something recognizable such every bit .htaccess_original or .htaccess_backup is ideal.

Then, correct-click on the file and select Download. Open the file in a text editor and replace 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]  #Finish WordPress        

Rename this file .htaccess and upload information technology to your server. If this file was the source of the "Pitiful, you are not allowed to access this page" fault, then it should now be stock-still.

xi. Reset Your WordPress Site

In the worst-case scenario, there may exist an installation issue. To fix information technology, you'll have to reset your WordPress site. It'south vital that you lot have a recent backup you lot can restore later this process is consummate, every bit resetting your site will cause yous to lose all posts, pages, and user comments.

At that place are several methods for doing this, including via your MyKinsta dashboard, using a WordPress plugin, and by using WP-CLI (the WordPress command line). It'southward best to save this route as a last resort, then y'all don't risk losing your site's content.

Are you getting the awfully alarming *Lamentable, You Are Not Allowed to Access This Page* bulletin? Try 1 of these methods to go your access back! 🙅‍♂️🔑 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, you are not immune to admission this folio" fault is vital to both your site and your peace of heed.

In this post, nosotros covered a wide range of possible causes and fixes for this issue. Let's recap 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 you're an ambassador.
  5. Cheque your error log to pinpoint the crusade.
  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 performance with:

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

All of that and much more, in 1 program with no long-term contracts, assisted migrations, and a 30-twenty-four hours-coin-back-guarantee. Check out our plans or talk to sales to find the plan that's correct for you.