@lagstrom, did you change your role back to Administrator before reverting the role definitions?
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?
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;}
I will try that. Do I have to remove the plugin completely before that? Pr having it and it being active does not matter?
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.
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.
Were you not able to find the usermeta row for your user?
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.