• Hi,

    I created a new local development WordPress site running 4.6.

    I copied the database from the remote site, added an entry for that site’s domain to use my local IP address in Windows hosts file, and added a vhost entry in my WampServer cfg.

    The site front end loads perfectly.

    However, when I try to view /wp-admin, I receive a white screen with the error:

    Sorry, you are not allowed to access this page.

    I am logged in okay.

    If I create a new administrator user account using PHPMyAdmin (from these instructions), I receive the same error.

    If I renamed /wp-content/plugins to /wp-content/plugins-old, the symptom persists.

    Help appreciated.

    Regards,
    Steve

Viewing 15 replies - 16 through 30 (of 32 total)
  • Thanks @konvergenzing, you solved me issue! The culprit, “wp_<customPrefix>_user_roles”

    I noticed that a lot of the messages above state that the issue started after upgrading to v4.6

    Check your server’s version of PHP – you need 5.5 or higher. I tested out some different versions on WP 4.6 install – using PHP 5.4 you get permission errors, they seem to go away at PHP 5.5.38 and above. And if your server is still running anything below 5.6 you are probably going to run into more security related issues – UPGRADE YOUR PHP to 5.6 and above.

    Hope this helps.

    Thanks for pointing out the table “wp_usermeta” I found some prefix there got Uppercase letters which is incorrect when compare to my wp_config.php table prefix. By changing them to match my table prefix on wp_config.php got fixed the problem.

    I think the main thing to know, the error indicated WordPress doesn’t recognise the role and capabilities of the user in order to access the dashboard area.

    • This reply was modified 8 years, 4 months ago by fkaufusi.

    Cheers to @konvergenzing for the solution posted above! Updating the values in BOTH the <prefix>_options and <prefix>_usermeta table worked for us!

    Rule of thumb for the future… always, ALWAYS try to ensure that you are working with the same database prefixes if at all possible.

    I have Facing same issue on wordpress version 4.7.we have change table prefix wp_ to wp_123 after changing prefix.when i try login /wp-admin i received white screen with the error

    Sorry, you are not allowed to access this page.

    Please help appropriates..

    thanks,

    Divyesh.

    • This reply was modified 8 years, 2 months ago by Divyesh_kakrecha. Reason: Type wrong word

    This solution also worked for me

    1) wp_<customPrefix>_usermeta – look through the “meta_key” column and change all values to the correct prefix (it was about 10 values for me).
    2) wp_<customPrefix>_options – in the “option_name” column find an entry that looks like “wp_<customPrefix>_user_roles” and change it to the correct prefix.

    THANK YOU @konvergenzing!

    changing the prefix in the mentioned tables fixed the whole issue for me.

    In other words, the following procedure worked:

    “I also had to manually update the database in two tables
    1) wp_<customPrefix>_usermeta – look through the “meta_key” column and change all values to the correct prefix (it was about 10 values for me).
    2) wp_<customPrefix>_options – in the “option_name” column find an entry that looks like “wp_<customPrefix>_user_roles” and change it to the correct prefix.”

    Excellent Philip @pingram3541 – I was searching for ages for a solution to this problem and yours was the one!

    Cheers!

    pingram

    (@pingram3541)

    @arathra Yeah I’ve only encountered this issue once w/ a migration and never resurfaced again but glad the fix was helpful for you too =)

    firehawk86

    (@firehawk86)

    In the process of trying to fix it. I must have changed accidentally some values.

    Setting the value of <prefix>_capabilities to a:2:{s:13:"administrator";b:1;s:13:"bbp_keymaster";b:1;} in <prefix>_usermeta has fixed it for me.

    link

    I used a:1:{s:13:”administrator”;b:1;}, just to try and see if this solves the issue, but it didn’t work.

    So, If you changed all prefixes and it’s still not working, this may work.

    • This reply was modified 8 years ago by firehawk86.

    Thank you so much!!! @konvergenzing, Your solution was exactly what I needed!!!

    • This reply was modified 7 years, 12 months ago by IMWD.

    I discovered a quick and easy method to resolve this issue. I had installed a new plugin, activated it, and when I went to access the settings I got the error message “Sorry, you are not allowed to access this page” on a blank white screen.

    I hit the back button in the browser to return to main admin screen, then went to Settings > Permalinks and just re-saved my permalinks. I believe that re-writes the .htaccess file.

    After that, no problemo! YMMV.

    This is what I was told:

    [03-May-2017 16:05:03 UTC] PHP Fatal error: Class ‘WPSEO_OnPage’ not found in /home/angelict/public_html/wp-content/plugins/wordpress-seo/wp-seo-main.php on line 390
    [03-May-2017 16:10:03 UTC] PHP Warning: include(/home/angelict/public_html/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php): failed to open stream: No such file or directory in /home/angelict/public_html/wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader52.php on line 186
    [03-May-2017 16:10:03 UTC] PHP Warning: include(): Failed opening ‘/home/angelict/public_html/wp-content/plugins/wordpress-seo/admin/onpage/class-onpage.php’ for inclusion (include_path=’.:/opt/cpanel/ea-php56/root/usr/share/pear’) in /home/angelict/public_html/wp-content/plugins/wordpress-seo/vendor/composer/ClassLoader52.php on line 186

    [03-May-2017 16:10:03 UTC] PHP Fatal error: Class ‘WPSEO_OnPage’ not found in /home/angelict/public_html/wp-content/plugins/wordpress-seo/wp-seo-main.php on line 390

    Tech Support Team,
    Blue Bell Web Hosting, LLC

    Now, how do I fix it??? OnPage says the fault is not theirs. Yoast support is so convoluted that the only way I can figure out which way is up, is to pay for their help.
    I’m a little slow on the uptake, but I am trainable. Any assistance is greatly appreciated.

    Namasté

    Deb-J

    @wellnessrn4u I don’t think your host is the best place to get support on WordPress. I’d suggest reaching out to the SEO plugin authors. I’m pretty sure those “no such file or directory” errors are related to missing files or incorrect paths/file names that are specific to that SEO plugin not Elementor. I’d suggest re-installing the plugin in case files really are missing and if not, try asking them to look into it.

    Edit: I see you stated OnPage said it was not their end but with those errors I can’t see how not if all files are present and permissions are proper.

    • This reply was modified 7 years, 10 months ago by pingram.

    I’ve not found that any of the solutions posted here have solved my problem – which is exactly the same as posted by the OP.

    I note that the OP (@srd75) has not posted that his problem has been fixed either.

    Any other suggestions?

    Alex

Viewing 15 replies - 16 through 30 (of 32 total)
  • The topic ‘/wp-admin: Sorry, you are not allowed to access this page.’ is closed to new replies.