Admin Login (5 posts)

  1. stranger26
    Posted 1 year ago #

    Is there a way to check if the user is an admin via database or without logging into dashboard.
    Also, is there anyway to promote a user into admin from database?
    Thank you!

  2. Sarathlal N
    Posted 1 year ago #

    That is possible.

    You just want to edit wp-usermeta table.

    For administrator, the wp-capabilities meta-key will be a:1:{s:13:"administrator";b:1;} and wp_user_level meta-key will be 10 in wp-usermeta table.

  3. stranger26
    Posted 1 year ago #

    Hi, thank you for responding.
    However just to be safe, here is my current value in wp-capabilities:
    Does it mean that the rest of the chunk is for plugins?
    Or do I just replace the whole chunk?
    Thank you! :)

  4. Sarathlal N
    Posted 1 year ago #

    in my fresh wordpress installation, for administrator, my the wp-capabilities meta-key will be a:1:{s:13:"administrator";b:1;}.

    But in your case, you have a membership plugin.

    Just backup your database first because if we got some error, we can replace them. So keep a good backup and try copy paste meta-keys on a new installation on your localhost with your plugins.

    I believe that you want to replace the whole value in wp-capabilities & wp_user_level. But I'm not sure about it because you have a membership plugin.

  5. S M Hasibul Islam
    Posted 1 year ago #

    Sure, why not?

    From Database option =>
    1. go phpmyadmin using by your DB access information.
    2. Select wp_usermeta table
    3. Edit from edit option
    4. Use this value a:1:{s:13:"administrator";b:1;} for become administrator user on meta_value

    From WP Dashboard option =>

    1. Go to wp-admin using by as a administrator user
    2. Select All User from Users menu.
    3. Press Edit button & select Administrator as Role.

    Done! May it will help you & work nicely.

    [ Signature moderated ]

Topic Closed

This topic has been closed to new replies.

About this Topic