I got this excellent tip from a user in our forum. It would come in handy if you just upgrades WordPress and are getting this error:

You do not have sufficient permissions to access this page

Now, that 100 million sites are upgrading to WordPress 3.0, there’s a good chance folks get bitten by it.

If your WordPress install is a non-English version, and you haven’t changed the default authorization keys in wp-config.php to something else, it’s possible that the WPML install will fail and prevent you from logging into the admin area with a message in your language with a meaning similar to ‘You do not have sufficient permissions to access this page.’

To prevent this issue and be able to install WPML without problem, please first change the four authorization keys on your wp-config.php to something else. You can use the following link to create a set of four random keys ready to be pasted into your wp-config.php:

https://api.wordpress.org/secret-key/1.1/salt/

Changing these keys will cause all logged in users to be logged out, forcing them to log in again the next time they access your blog. Other than that, there are no ill effect.

If you installed WPML without taking the above precaution and are now unable to access your admin area, delete the WPML folder, sitepress-multilingual-cms, from within wp-content/plugins, and you’ll be able to login into it again. Then follow the above procedure to be able to install it.

This behavior is caused by a bug in the WordPress core that can also affect other plugins. Changing the authorization keys from their default value is the safest way to avoid potential problems not only with WPML, but with them too.

16 Responses to “Fixing – “You do not have sufficient permissions to access this page””

  1. Cyrille Tuzi says:

    This is not the good url for WordPress 3.0, which have four more keys to be defined.

    The good one is :
    https://api.wordpress.org/secret-key/1.1/salt/

    (It can be verified in wp-config-sample.php of WordPress 3.0)

    • Hano says:

      Cyrille: Thanks a lot!!
      I´ve been struggling with this issue for a long time now. The four more keys got it going. I´m so happy.
      Thanks again:)

      • Cyrille Tuzi says:

        Yes, I think this is a point the WordPress team should mention, because everyone do the automatic update, and nobody will update his wp-config.php file…

    • amir says:

      Thanks! I updated the post.

  2. Thanks for mentioning it! Too bad I wrote this in a hurry back then. I should have revised it better. It’s full of grammatical errors. 🙁

    Well, as long as it helps those experiencing this issue I guess that’s okay. Better badly written than not written at all. 🙂

  3. Victoria says:

    i don’t know what to do. I don’t know anything about html really or my database. Can I get step by step instructions.

    I can get in the backend of my site but I cannot edit any pages I created or post.

    This is a real nightmare.

  4. Mazzieh says:

    Greate tip! Thank you very much.

    For lower version of wordpress is same solution, but you have to paste first 4 line from this link…

  5. Maicol says:

    Work pretty good applying the four random keys. Thx a lot!

  6. Marc says:

    This must be a joke. Impossible to get a worst WPML first impression.

    • amir says:

      This is not an issue with WPML, but with WordPress. It will happen without WPML too, if you just switch the locale on an existing sites (for some sites, not all).

  7. Viktor says:

    Excellent!
    This has fixed login error / rediecting when using second language…

  8. shanna says:

    the info was helpful but my issue was solved today using the method listed here :http://ghaoui.com/blog/2011/12/wp-solve-you-do-not-have-sufficient-permissions-to-access-this-page/
    I had two sites, one of them actually had the above solution, and one of them had your solution…
    The weird part about WP is that it always spits the same error
    We have to go trying all your guys solutions everytime till one of them hits a good return for us !
    WP should really work towards specifying admin errors, makes life easier for admins 😀

  9. imran says:

    It works. Thank you very much.

  10. vinay says:

    yah,worked me too…thnx

  11. bernard says:

    Thanks a lot for this 🙂 you saved me from a lot of trouble here

  12. Zinal Shah says:

    It works..Thanks a lot!!!