WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Admin access (You do not have sufficient permissions to access this page.) (23 posts)

  1. eightlaces
    Member
    Posted 1 year ago #

    Hey there,

    I was having quite a bit of difficulty with the "You do not have sufficient permissions to access this page." error to the point where I decided to scrap everything and start from scratch.

    A new installation led to not being able to connect to the database and whole bunch of new problems, so I recovered everything and the nice folks at Dreamhost helped me plug everything in correctly.

    Still, the error persists.

    I decided to go digging in the SQL database and used this article in the hopes that I could give a user admin access this way. Three tries and nothing.

    I attempted to create a brand new user. Nothing.

    Please help.

  2. David Choi
    Member
    Posted 1 year ago #

    Maybe it's related to changed table prefixes? Here is what I've found:

  3. eightlaces
    Member
    Posted 1 year ago #

    You'll have to excuse my ignorance as I'm just getting familiar with SQL.

    Where would I plug these in at?

  4. @EndlessScroll.com: eightlaces' issues have nothing to do with changed database table prefixes.

    @eightlaces: What page are you trying to access? Are you sure you are logged in as an admin?

  5. eightlaces
    Member
    Posted 1 year ago #

    @song

    The standard wp-admin page. As I said, I went in and attempted to give multiple users admin access including a brand new user, but for whatever reason, I couldn't log in as any of them.

  6. so I recovered everything and the nice folks at Dreamhost helped me plug everything in correctly

    What exactly did Dreamhost do? Are you using the old problematic database with a "new" install?

  7. eightlaces
    Member
    Posted 1 year ago #

    Dreamhost plugged in the appropriate database, user/PW data, the basic stuff.

    Technically I am using the old database, but I tried making two others and still encountered the WordPress "can't establish a connection with the database" error.

  8. OK, but what is happening now? "Can't establish a connection with the database" is a completely different animal than "You do not have sufficient permissions to access this page."

  9. eightlaces
    Member
    Posted 1 year ago #

    I'm getting the "You do not have sufficient permissions to access this page." error.

  10. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    eightlaces, the last ticket I see from you here at DH is that you don't know your WP username and password.

    I used WP CLI to check on your users, and the problem is none of your users have any roles associated with them! Whoops! That would do it.

    I did a little digging in your DB and discovered it's because of curly quotes!

    a:1:{s:13:”administrator”;b:1;}

    That's not the same as this:
    a:1:{s:13:"administrator";b:1;}

    I went ahead and manually corrected those for you. Try logging in now?

  11. eightlaces
    Member
    Posted 1 year ago #

    Oh heavens, you are all my bestest friends!

    Thanks SO much for the help!!!

  12. Ipstenu-DH
    DreamHost Rep
    Posted 1 year ago #

    You're very welcome! :) If you need any more help at DreamHost, just let us know.

    Have a good weekend :)

  13. Leepallister
    Member
    Posted 1 year ago #

    Can anyone help? I habe the same problem! I can access other areas of my dashboard by extending the string (I.E wp-admin/post) but cannot simply login to my dashboard! My hosts are useless with their support too!

  14. esmi
    Forum Moderator
    Posted 1 year ago #

    @Leepallister: As per the Forum Welcome, please post your own topic.

  15. david4angie
    Member
    Posted 11 months ago #

    I have managed to get a wordpress site ....www.78bishopsgate.co.uk on line. I haven't been to it for a while and when I type in http://www.78bishopsgate.co.uk/wp-admin it gives me the same standard screen saying I do not have sufficient permissions... as far as I know I have not changed anything, there is only one user...i.e. me and I cannot begin to think what could have happened.

  16. esmi
    Forum Moderator
    Posted 11 months ago #

    Using Phpmyadmin (or another MySQL management tool), first backup your database. Then navigate to your wp_usermeta table and locate the meta_key called "wp_capabilities" for your user_id. Change the meta-value for this record to:

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

  17. david4angie
    Member
    Posted 11 months ago #

    OK thanks - although I am afraid that is rather a foreign language to me... is this possible for a layman to do or do I need professional help?

  18. Ipstenu-DH
    DreamHost Rep
    Posted 11 months ago #

    david4angie, you should probably make your own post, as this is resolved (and you're on Heart Internet, not DreamHost).

    It IS possible for a layman to do it, but ask your host how to access phpMyAdmin if you don't know how.

  19. david4angie
    Member
    Posted 11 months ago #

    Wasn't me talking about Dreamhost, that was some other chap! Yes after the hugely complicated email from our good friend esmi, a friend of my suggested that I re-set password. What appeared to be happening was WP was trying to use my twitter handle as my user name which was why it wasn't letting me in...don't ask me any more as I know not where or how

  20. Ipstenu-DH
    DreamHost Rep
    Posted 11 months ago #

    david4angie, the point was the ORIGINAL poster, eightlaces, WAS asking about DreamHost, and this topic is resolved.

    So you're not going to get anyone 'new' helping you in anything that's resolved, or NOT specific to your problems. Which is why we ask folks, 99% of the time, to make a new topic all for themselves :D Make sense?

  21. SoCalCreations
    Member
    Posted 11 months ago #

    I have the same issue as above "You do not have sufficient permissions to access this page."

    However, the following did not work
    a:1:{s:13:"administrator";s:1:"1";}

    I am pretty sure that I don't understand this statement... since there are 3 "1", I assuming one of them corresponds to my admin id, which do I change for the ID of the new current Admin user ID?

    NOTE: This happened after I changed the table prefix from wp_ in the database as well as in the wp-config.php file.

    NOTE 2: before the change, the field content was
    a:1:{s:13:"administrator";b:1;} <- same as other two admins accounts, which don't work either.

    ALSO TRIED changing the following from another post on the subject
    in table "newprefix_options"
    option_name "wp_user_roles" to "newprefix_user_roles"

    NO GO there either, after every change attempt the browser was cleared of site data.

  22. SoCalCreations
    Member
    Posted 11 months ago #

    I think I might have found the Solution, but I want to ask you experts who have experience with this issue.

    I found the following at http://wordpress.org/support/topic/wp-admin-you-do-not-have-sufficient-permissions-to-access-this-page?replies=12

    In your database, using phpMyAdmin, check that the tables all begin with the same prefix that you have in your wp-config.php. For example if you changed your table prefix to "b2", the tables would be "b2_commentmeta", b2_comments", etc.
    Also, you have to check inside two tables to see that certain field names are also changed. So, using the same prefix as above, in b2_options, the field wp_user_roles has to be changed to b2_user_roles. And in the b2_usermeta table, the fields wp_capabilities, wp_user_level, wp_user-settings, wp_user-settings-time, and wp_dashboard_quick_press_last_post_id should all have the prefix b2_ instead of wp_.

    And lastly, within your database, look at the values in the wp_usermeta table as follows:

    wp_capabilities should be a:1:{s:13:"administrator";s:1:"1";}

    wp_user_level should be 10

    AFTER
    Doing this, I was able to get back in to the Admin Dashboard. However, my question is, will these changes move forward, for new members, etc. or is this just a band-aide?

  23. I'm closing this thread. eightlaces has been helped.

    Everyone else - Make your own topics.

    Especially you SoCalCreations - You have a different issue

Topic Closed

This topic has been closed to new replies.

About this Topic