Problem: Login page either displays “Too Many Redirects” error message, or it actually logs in but the CSS is all fucked up and all the Admin pages are 404s. Ugh.

Solution (at least in my case): WPBeginner’s How to Add an Admin User to the WordPress Database via MySQL

After following their instructions, and trying to log in, I got the “You do not have sufficient permissions to access this page” error message. Ugh!

Then I realized I’d fucked up.

  • I had to replace their first example meta_key “wp_” prefix (wp_capabilities) with my own DB prefix. So I changed wp_capabilities to mycrazyassprefix_capabilities.
  • Same with their second meta_key example (wp_user_level), I had to change their “wp_” prefix to my specific prefix. So I changed wp_user_level to mycrazyassprefix_user_level.

Then I was able to log in. Beautimous!

I’m tellin you, WPBeginner knows their shit. I’ve come to trust them as a go-to resource!