Wordpress - How do I fix the "sorry, you are not allowed to access this page" error I get on the "plugins > settings" links?

If you have https on WordPress and you added below code on wp-config.php,then be sure that lines must be on top of page. I found this issue. And may be it can help.

define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
    $_SERVER['HTTPS']='on';

According to me Login into PHPMyAdmin goto wp_usermeta then edit wp32_capabilities of any user and add this a:1:{s:13:"administrator";s:1:"1";} It will change the user Privilege to admin. There are several reasons it will change and you will get the error.

I was getting this error on my website and I try this only once and it was resolved.

Tags:

Plugins

Errors