wp-admin: “Sorry, you are not allowed to access this page.”

Because you have renamed the plugin and theme directory, it should a problem on your user. But rename the whole wp-content directory, so that all add-ons are inactive, check it again.

User Rights

After them, logged in to a database tool, like “Adminer” or “PhpMyAdmin” and look at the table usermeta with your user ID*, like

SELECT * FROM wp_usermeta WHERE user_id = ‘1’`

Check the entries wp_capabilities and you should have the administrator key, like a:1:{s:13:"administrator";b:1;}.

*Note: To identify your user ID, look at the frontend, list all your posts and look at the URL, the key ?author= has your User ID. It is also possible after login in the wp-admin area on links with user keys.

Permalinks

Another chance to fix them is the .htaccess file. Maybe this is not correct, and you have issues with the permalinks.

tech