P粉8183174102023-08-31 00:28:33
Wow, that’s so fast. I created a Stack Overflow account today just to post this question, and after days of banging my head against my desk trying to figure this out, I had a solution within a few hours.
For anyone experiencing similar issues, be sure to do a regular check to troubleshoot these issues first, then go to your site's phpmyadmin and then to the wp_options > table. Find the wp_user_roles entry. Make sure it has something like this:
My wp_user_roles actually just sets it to the value:
It turns out this is the wrong value! I don't know how this happened. Before this question, I had not messed around in phpmyadmin at all. It should be a plug-in or something. When I replaced that AOK with the correct list of roles and features, I was immediately able to access the WordPress admin dashboard again.
If you are using WooCommerce, there is an extra step: you need to deactivate and reactivate the WooCommerce plugin. This is because the list of roles above is missing a WooCommerce-specific role called "Store Manager", which gives you access to WooCommerce's product, orders, analytics, coupons, and more pages.
That's it! Big thanks to @VijayHardaha for helping with this! I hope this post helps someone else one day.