• Resolved lagstrom

    (@lagstrom)


    Hi.
    I installed the plugin and first made a backup. I then created a new role called consultant.
    I noticed my own role as an admin did not have all rights so I created another role called Super Admin and assigned that to myself. Then I tried to edit the Consultant rold but the plugin told me I had no rights. at last without luck I restored the backup to my original settings.
    Now I cannot reach even the /wp-admin page It says access denied. I checked the roles for wp-login.php and it has got 0644 permissions as it should right? How can I solve this. Please help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Kevin Behrens

    (@kevinb)

    @lagstrom, did you change your role back to Administrator before reverting the role definitions?

    Thread Starter lagstrom

    (@lagstrom)

    Hi. No.
    But I created another user before all went south called “Consultant” and it has got the Woocommerce rights as “Shopkeeper” iI am able to login as that user through /wp-login.php
    But I cannot change anything with that user due to low permission. Though I can see that the admin user (the only other user in my wordpressinstallation) have “No role”.
    Can I somehow give the “Consultant” user admin permissions through phpmyadmin so I can control the website?

    Plugin Author Kevin Behrens

    (@kevinb)

    You can use phpMyAdmin to restore your Administrator role. You will need to know the user ID or your original Administrator. Find your usermeta table and hit the Search link. Search for the following:

    • meta_key LIKE %_capabilities
    • user_id = [your ID]

    One row should be found. Change its meta_value to the following:

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

    Thread Starter lagstrom

    (@lagstrom)

    I will try that. Do I have to remove the plugin completely before that? Pr having it and it being active does not matter?

    Plugin Author Kevin Behrens

    (@kevinb)

    There’s no need to remove the plugin.

    I don’t recommend changing your main Administrator to a different role. It’s asking for compatibility problems with many plugins that assume the Administrator role name. If you do give another user an Administrator-like role, make sure the numeric level of that role is higher than the roles they should be able to edit. Role Level can be set by CME using the dropdown at the bottom of the Roles and Capabilities screen.

    Thread Starter lagstrom

    (@lagstrom)

    Thanks. I needed to get my host to re-install the entire wordpress installation from a nightly web server backup from yesterday.
    I usually find out how to solve thing by googling and expirience, but tjhis was a tough nut to crack. I dont dare to go into the plugin again. It would be nice with a “simple mode” of some kind where you cant corrupt your own logged in user.
    Otherwise it seems like a really good plugin.

    Plugin Author Kevin Behrens

    (@kevinb)

    Were you not able to find the usermeta row for your user?

    Plugin Author Kevin Behrens

    (@kevinb)

    For the record, there is another manual recovery step you could have taken using phpMyAdmin. Locate your options table and search for option_name LIKE %_user_roles. Replace that row’s option_value with the option_value from the capsman_backup_initial row.

    I will see what I can do to fence off the possibility of an Administrator detrimentally editing their own role definition or role assignment.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Access denied to wp-admin’ is closed to new replies.