I have a web site that has this problem. Here are the things that I did:
1- deleted all caches
2- reset .htaccess to default
3- renamed the plugins directory
4- renamed the theme directory
5- set WP_BUG enabled to see any errors
6- checked all directories and sub-directories for file/directory permission. all were correct: directories: 755 and files: 644
7- WP table prefixes are all default and lowercase
8- Table prefix was defined correct and in lowercase in config.php
Followed ALL instructions in all threads about this issue but I will have this problem. after login, I am redirected to home page and when I manually add /wp-admin to the URL I get the “Sorry, you are not allowed to access this page”
Tested in PHP: 5.4, 5.5, 5,6 and 7 and still cannot access wp-admin
WP Version: 4.7.2
What else I must check?