K
K
KurtsKhalia2015-08-02 19:44:11
Access rights
KurtsKhalia, 2015-08-02 19:44:11

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

1 answer(s)
D
Dmitry Korolev, 2015-08-09
@Apathetic

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 question

Ask a Question

731 491 924 answers to any question