Answer the question
In order to leave comments, you need to log in
How to change permissions in wordpress?
There is a site on the old 2.0+ wp engine. News and pages are added and edited, but when you try to go to /wp-admin/plugins.php
/wp-admin/options-general.php
and other sections, it says "You do not have sufficient rights to access this page."
How to change it? I also cannot find where the user type is written. There is access to ftp.
Answer the question
In order to leave comments, you need to log in
Use the WP_User class. The current user type can be viewed using the get('role') method.
You can try the following code (run once), if you do not have the roles themselves, then the user should be set to maximum rights:
$user = new WP_User('', '{login}');
$user->set_role('administrator'); // Or 'admin', I can't remember exactly what the role is called right now.
$user->get_role_caps();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question