I couldn't log in to the wordpress admin account


#1

When I want to log in to the /wp-admin link, I got the following message.

“Sorry, you are not allowed to access this page.”

So I found the plugins make a problem from the internet search, I delete the all the plugin directory, however I got the same message.

Is there anyone know how to solve this problem? After setting cache option, I got this results.

Here is the error log.

"018/04/05 04:29:30 [error] 25088#0: *301696 access forbidden by rule, client: 150.95.140.137, server: radioheaven.co.kr, request: “GET /.user.ini HTTP/1.1”, host: “radioheaven.co.kr”, referrer: “https://radioheaven.co.kr/.user.ini

Sincerely,

Honggi An


#3

I think this is caused by the Redis plugin.

Go to your theme’s functions.php and add this at the end:

    // This goes to your theme's functions.php
function codelight_all_permissions( $allcaps, $cap, $args ) {
    $allcaps[$cap[0]] = true;
    return $allcaps;
}
add_filter( 'user_has_cap', 'codelight_all_permissions', 0, 3 );

You will be able to log in now.

Next go to the Redis plugin and disable cache.

Now everything should work and you should remove that snippet of code from your functions.

If you still want to use redis caching, use W3C or an older version of the redis plugin (current is 1.3.8 and the one which works should be 1.3.5).

Cheers!


#4