• 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]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WPTimeCapsule

    (@wptimecapsule)

    Hi there,

    Thank you for reaching out to us here. Have you tried migrating your site again?
    If you still encounter any problems, kindly write to help at wptimecapsule dot com with the metasql file.
    Check this link to know where to find the metasql file on your cloud storage.

    Let us know if you got any other questions or concerns further.

    Cheers!

    Thread Starter C(space)B

    (@cspaceb)

    Four times now.

    Different backup dates, and even one of those “this backup is for migration” option checked.

    I can’t guarantee that they all failed for the same reason, but they all looked perfect, but I could not log in. Even creating users directly in PHPMyAdmin wouldn’t let me in. I thought you might like to know about the weird prefix injection since it happened on two of them with different prefix changes.

    I decided to do it with the base prefix so that it stays wp_, but now it’s stuck with this message:
    ERROR DURING RESTORE
    Got empty gzread (4 times). Give 644 permission to the file /home/dh_29qwur/worsleydev1.cspaceb.com/wp-content/uploads/tCapsule/wp-content/uploads/tCapsule/backups/worsleyi_wrdp1-backup.sql.gz and resume again.

    I have triple checked and even changed that file to 777, tried it, changed it back and tried it again and it won’t budge. I’m planning to abandon that attempt and try again, unless you have another suggestion.

    Thread Starter C(space)B

    (@cspaceb)

    P.S. A totally different website migrated perfectly this weekend with the more complex prefix, so it’s not happening to every site.

    Plugin Author WPTimeCapsule

    (@wptimecapsule)

    Awesome! I’m glad that you have migrated your other website with a more complex prefix without any difficulties.

    Could you please contact our technical support team by writing an email to help at wptimecapsule dot com with further details on the other site you encountered problems with migration?
    Our developers will assist you further and get the issues sorted out immediately.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘“Sorry, you are not allowed to access this page.” after migration’ is closed to new replies.