Ever Get “Sorry You are not allowed to access this page”

WordPress is very definitive sometimes! When I ran into this problem of logging into the /wp-admin/ page only to be told “Sorry You are not allowed to access this page”, I found that most people online that were complaining were people who were already administrators on the site.

Step 1 is to disable all your plugins via FTP/SFTP, and try to log in again.

If this fails, disable your themes, again using FTP/SFTP and try to log in again.

The final step to try, could come from having added yourself manually to the database or a change in the database table prefix.
Go to your table _usermeta (where it was wp_usermeta but now you’ve updated it to a new string of characters).
And find your user_id’s corresponding fields for what is probably currently wp_capabilities.
Change wp_capabilities to read _capabilities to match the prefix of your table names.
Likewise, change your wp_user_level to _user_level to again match the prefix of your table names.

When you return to log in, at this stage you should find that you are able to log in successfully.