• please help, problems with administrating my website.

    i CAN login with my admin user, but i don’t get redirected to the “dashboard”.
    it looks like wordpress consider me as normal user, and not ADMIN, so can’t edit anything.
    when i type in URL wp-admin/edit.php i got message that this URL can’t be accessed with my user.

    i tested with other users that i had, and i even created a new user with admin rights via “phpmyadmin” .

    still same result ! i desactivated all plugins (moved them to another problem) but the problem persist.

    i deactivated theme and still same.

    any ideas ?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Hi @yurone,
    if you look at the wp_usermeta table you can see that there is a column “wp_capabilities”. What’s inside?

    Thread Starter yurone

    (@yurone)

    I am not infront of computer now , but I am sure that’s a correct info there , because I had 2 admin users that was already working properly before and I created a new user via phpmyadmin following tutorial

    https://www.wpbeginner.com/wp-tutorials/how-to-add-an-admin-user-to-the-wordpress-database-via-mysql/

    Thread Starter yurone

    (@yurone)

    i checked
    a:1:{s:13:”administrator”;s:1:”1″;}

    all the prefixes are pr_ instead of usual wp_
    since long time with no issues

    Thread Starter yurone

    (@yurone)

    hi @lucagrandicelli

    any help ???

    Backup that string and try this one instead:
    a:1:{s:13:”administrator”;b:1;}
    Then open the wp_user_meta table and make sure the field “wp_capabilities” related to your user ID is set to 10

    Then try to log in.

    Thread Starter yurone

    (@yurone)

    i think , i did

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

    >>> not sure what you talk about – related to your user ID is set to 10

    in wp_usermeta
    for my user the
    wp_user_level
    10

    Thread Starter yurone

    (@yurone)

    @lucagrandicelli

    i tried both

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

    same results.
    is there anything in logs related to this debug?

    Well, at this point it’s quite hard to understand what’s going on without further details. If you have a working admin user, log on with that and recreate another one. Make sure there are no special plugins which can interfere with user roles.
    Where do you get redirected to after authentication?

    Thread Starter yurone

    (@yurone)

    i don’t acess to dashboard with old users.
    i created new user with this commands

    INSERT INTO databasename.wp_users (ID, user_login, user_pass, user_nicename, user_email, user_url, user_registered, user_activation_key, user_status, display_name) VALUES (‘4’, ‘demo’, MD5(‘demo’), ‘Your Name’, ‘[email protected]’, ‘https://www.test.com/’, ‘2011-06-07 00:00:00’, ”, ‘0’, ‘Your Name’);

    INSERT INTO databasename.wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, ‘4’, ‘wp_capabilities’, ‘a:1:{s:13:”administrator”;s:1:”1″;}’);

    INSERT INTO databasename.wp_usermeta (umeta_id, user_id, meta_key, meta_value) VALUES (NULL, ‘4’, ‘wp_user_level’, ’10’);

    it worked because i managed to login with this user.
    i also tried to change to a:1:{s:13:”administrator”;b:1;}

    after connection to https://___.com/wp-login.php?
    i am getting connected to the same page with admin bar on top,
    however it is a “user” bar, because there are no admin options.

    and when i click any protected url i have this “generic” error

    .
    Désolé, vous n’avez pas l’autorisation d’accéder à cette page.

    (Sorry, you do not have permission to access this page.)

    my WP site is in french

    Ok at this point i think you’re experiencing some troubles with the database table integrity, probably due to a lack of “auto increment” on db primary keys.
    Did you perform any db import lately?

    However, a good advice would be to perform a “repair tables” command via phpMyAdmin but, in this case, let your hosting provider do this for you. (also, explain your issue).

    Thread Starter yurone

    (@yurone)

    will try that…
    so strange it happen suddenly…

    here is screenshot od db https://imgur.com/a/xCtjyST

    can be also a problem with quotes… sometimes there is a difference when you copy / paste.

    Thread Starter yurone

    (@yurone)

    didn’t touch it since a while, and i think many plugins haven’t been updated.

    i have backups…
    there was no apparent changes in database values.

    Yeah, those quotes don’t seem proper to me. Retype that string, in case.

    Thread Starter yurone

    (@yurone)

    @lucagrandicelli
    so i tried both
    a:1:{s:13:”administrator”;b:1;} and
    a:1:{s:13:”administrator”;s:1;}
    with a proper ”

    and not satisfying results..

    maybe there is a place i can see logs related to user logins ?
    i tried to activate DEBUG log, but i don’t see anything there related to logins.

    what i triead again is via FTP i desactivated all plugins, and desactivated the theme and same results.

    also i tried changing 10 to 0 values for wp_user_level
    and it doesn’t do any change

    Thread Starter yurone

    (@yurone)

    i also tried one thing,

    A //pr_capabilities
    a:2:{s:13:”administrator”;b:1;}

    when i access https://____/wp-admin/
    i see message “Sorry, you are not allowed to access this page.”

    so i understand that my user is not admin for him

    B //pr_capabilities
    a:2:{s:13:”administrator”;b:1;s:14:”backwpup_admin”;b:1;}

    when i access https://____/wp-admin/
    i see dashboard, but not all apps, i see only backupwpup
    so still i am not visible as admin, but there is a hope ??

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘admin login OK, but can’t edit’ is closed to new replies.