Administrator Permissions Changed
-
Wordpress version 5.1.8
My website was hacked and the permissions of what an Administrator can do has changed. I have already locked the website down. But now with the Administrator user I have I cannot do anything like download new plugins and themes. I can’t update wordpress, it tells me that WordPress 5.5.3 is available and to please notify the site administrator.
I have two different Administrator users for this site. I have tried using both users with no luck, and I have even deleted a user and made a new one to see if that would fix it and no such luck.
Is there something in the coding I have to change to get the Administrator’s permissions back to normal?
The page I need help with: [log in to see the link]
-
https://ww.wp.xz.cn/plugins/reset-roles-and-capabilities/ will do what you need, I think.
I gave that a try and it did not work. It is still giving me the notification that says “WordPress 5.5.3 is available! Please notify the site administrator.”
You might ask the plugin’s author how to work this in your circumstance: https://ww.wp.xz.cn/support/plugin/reset-roles-and-capabilities/
That may be easier than this: https://www.role-editor.com/restore-lost-wordpress-admin-permissions/
That did not work either. So according to the DB all the User’s Roles should be reset to what they were originally. My user is set to an administrator in the DB. But yet it is still not working.
I also downloaded the plugin User Role Editor and created a new user with all the same capabilities as an admin and that did not work either.
Do you happen to have the
DISALLOW_FILE_MODSconstant set in yourwp-config.phpfile? That would prevent you from installing new plugins or updating Core.You still have access to install and activate plugins?
Do you have any user-role plugins besides the role editor? That is, did you have ones prior?
I’ve untangled these before with wp-cli, which let me see that the admins were given the wrong role name but I don’t know if you have access to that.
If you do, I would run
wp user listto get a list of the users and make sure the role is set to administrator (not admin). If not, you can usewp user set-role(see https://developer.ww.wp.xz.cn/cli/commands/user/set-role/ ) to force the account to be an admin.You can also use the role command to reset https://developer.ww.wp.xz.cn/cli/commands/role/
wp role reset administrator@timothyblynjacobs your info regarding DISALLOW_FILE_MODS was exactly what worked in my case – much appreciated!
DISALLOW_FILE_MODS
This worked … thx
changed value from true to false
define(‘DISALLOW_FILE_EDIT’, false);
define(‘DISALLOW_FILE_MODS’, false);
The topic ‘Administrator Permissions Changed’ is closed to new replies.