“Sorry, you are not allowed to access this page.” after migration
-
After migrating a site, I get the dreaded “Sorry, you are not allowed to access this page.” message for the admin area.
I finally found that in the database, in the wp_options table (really wp_PREFIX_options), the wp_user_roles record in option_name (and several others) has been changed to wp_PREFIX_PREFIX_user_roles, etc.
In the wp_usermeta table (again, really wp_PREFIX_usermeta), all the wp_user_level and wp_capabilities meta_keys have been changed to wp_PREFIX_user_level and wp_PREFIX_capabilities.
Even after doing a find and replace to repair them all, I still can’t log in. There has to be an issue with the find/replace done to the database on migration.
I have replicated this on two migrations of the same website with different prefixes. I’m about to change the prefix to just wp_ instead of wp_PREFIX to see if I can get it to work.
The original site is very old and just has wp_ as the prefix. My guess is that there’s an assumed prefix in the original site in the find/replace and when there is none, it has this problem. I’ll update after that migration attempt.
The page I need help with: [log in to see the link]
- The topic ‘“Sorry, you are not allowed to access this page.” after migration’ is closed to new replies.