/wp-admin returns "Sorry, you are not allowed to access this page." after adding CDN for SSL Termination?

Viewed 188

After adding a CDN (CloudFront) to my environment, my admin login is still recognized, but trying to go to /wp-admin causes "Sorry, you are not allowed to access this page."

I tried using Incognito mode in case it was a bad cookie, but no luck. What could cause this?

I tried enabling debug modes:

define('WP_DEBUG', true);
define('WP_DEBUG_DISPLAY', true);
define('WP_DEBUG_LOG', true);

But nothing got written to error_log and I didn't find debug.log.

1 Answers

If you were trying to migrate then check wp_options table and search for option_name with wp_user_roles In my case I had different table names wp_11_ which after migration changed it to wp_ then searched wp_options for %WP_11% found a result with option_name that had the old table value of wp_11_user_roles which I changed to wp_user_roles and then everything was set.

enter image description here

Related