Unable to login to the website

I have just migrated to WPMUdev and I am unable to login to the WP dashboard. I have tried working with Jayman your support rep who asked me to clear cache and try again after recreating the htaccess file for me but then our chat connection got cut off... suffice it to say that it didn't work. When I go to https://christienpaul.com/wp-login.php and enter my credentials I get redirected to the home page. So then I try to manually enter the path https://christienpaul.com/wp-admin/ and I get an error saying "Sorry you do not have permission to view this page"

I tried renaming the plugins directory thinking perhaps there was a conflict but that didn't help either. Everything was working fine on the last server, i.e. WP Engine but since migrating to WPMUdev I cannot login.

Please advise
CP

  • Adam Czajczyk
    • Support Gorilla

    Hi WP Chef

    I hope you're well today!

    I checked the site and you should now be able to login fine with the "chr...n" account as an administrator. In fact, the login worked fine all the time but the redirect there - to the homepage - was caused by the account not having an admin user role. Actually, it has no role that would let it access back-end, even not a subscriber.

    The fix here was as follows:

    1. the account had to be added "administrator" role in the database by adding it to _capabilities usermeta for the user
    2. the account had to be set to user_level 10 in database
    3. in the end the default WP user roles had to be restored in the database

    The core of the problem here was not only that the account didn't have the administrator user role but also that the WP user roles (and associated capabilities) configuration was "messed up" a bit in the database.

    Why did it happen then? I must say that I'm not sure but I can say that it's not migration related. It's the kind of changes that none of the migration tools does. I have also seen that exact issue before on a couple of sites that were never migrated anywhere and they were always related to one of two things:

    - some unfortunate update of either WooCommerce or WPML plugin (that was different in different cases) - by "unfortunate" I mean that it looked like update didn't went well and since both plugins actually do add/change capabilities that apparently was the part that failed

    - some changes being made to capabilities/roles with plugins such as User Role Editor where some capabilities or roles were accidentally changed/removed by user who tried to adjust them.

    Unfortunately I can't say what was the exact reason here but all the cases that I encountered in the past were related to these things. Anyway, you should be able to login fine now, just review the site please to make sure if everything's working fine.

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hi WP Chef

    Thanks for confirmation, I'm glad I could help!

    However, meanwhile some new possible reasons for the case came out so I'd like to ask you for a small help, if you don't mind. Could you please tell me how, exactly, did you migrate the site? It turns out that there is a chance that it might be related after all so I'd like to do some more tests with my own test sites to make sure about it. If you could just describe the migration process that you followed, that would be very helpful.

    Best regards,
    Adam

  • WP Chef
    • Site Builder, Child of Zeus

    No problem, at first I used the shipper plugin but that failed. So then I downloaded an SQL file from the old server at WP Engine as well as a zip of all the files (plugins, theme, core files) which I then uploaded via SFTP and imported the SQL file via phpMyadmin. So in essence, I had a corrupt installation made by the Shipper plugin which I then overwrote with a manual migration using phpMyadmin and SFTP.

    Hope that helps
    CP

  • Adam Czajczyk
    • Support Gorilla

    Hi WP Chef

    Yes, that helps, thank you very much :slight_smile: I think we can consider the case closed for now so thank you again for your help on this!

    In case I came across some additional questions related to the case, I'll let myself get back to you and ask. But I think it should be all right now :slight_smile:

    Have a great day!
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.