Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Solved Cannot login to site after migrating a wordpress.com site to Cloudron

    WordPress (Developer)
    5
    14
    262
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jdaviescoates
      jdaviescoates last edited by jdaviescoates

      Hi all,

      I just used https://wordpress.org/plugins/all-in-one-wp-migration/ to migrate https://gooplearn.wpcomstaging.com/ (a wordpress.com site to https://goop.development.coop/

      It's all worked great, aside from one rather big issue: I can no longer login to the website.

      I contacted servmask (the people who make the great migration plugin linked to above) and they quickly replied suggesting I use their reset password tool as described here:

      Youtube Video

      But that didn't work either:

      Youtube Video

      So, I'm guessing the issue must be something to do with the Cloudron environment.

      Help!

      (tagging @d19dotca as I know he's used this plugin quite a bit 🙂 )

      I use Cloudron with Gandi & Hetzner

      1 Reply Last reply Reply Quote 0
      • jdaviescoates
        jdaviescoates last edited by jdaviescoates

        WP CLI to the rescue!

        Solved it by opening the app web terminal and doing this:

        wp cache flush

        Then I could login again!

        Now to start again with a clean slate in case my tinkering has left a mess

        Edit: turns out it wasn't just flushing the cache that that fixed it! Seems I had to use the reset password tool first and then flush the cache and then login using that new login in a private browsing tab, and then I could login and then I was away.

        So, basically what resolved this was:

        1. using the resetpass.php tool to reset the admin user pw to servmask
        2. flushing the cache using wp cli i.e. type wp cache flush into the app web terminal
        3. login in an incognito/ private tab using the credentials from the resetpass.php tool
        4. editing/ updating the passwords of other users (even after getting access none of the old pw worked before anymore)
        5. delete the resetpass.php tool

        (but perhaps the suggestion by @micmc would've worked too. Edit: nope, that wouldn't have helped - the wpconfig.php files before and after migration were identical.)

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply Reply Quote 0
        • jdaviescoates
          jdaviescoates last edited by

          I figured I'd try to use these MySQL instructions to adding a new user directly into the database:

          https://wp-qa.com/wordpress-cannot-login-after-migrating-with-all-in-one-wp-migration

          But even though I can get into MySQL using the Terminal, I can't use those commands as I don't know the db name and password.

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply Reply Quote 0
          • jdaviescoates
            jdaviescoates last edited by jdaviescoates

            Using wp cli I can see all the users are there, but none of them can login

            /app/code# wp user list +-----------+---------------+---------------+----------------------------------+---------------------+---------------+ | ID | user_login | display_name | user_email | user_registered | roles | +-----------+---------------+---------------+----------------------------------+---------------------+---------------+ | 217402542 | gooplearn | gooplearn | xxx@xxx.xxx | 2022-02-18 22:11:09 | administrator | | 217402544 | jdaviescoates | jdaviescoates | josef@xxx.xxx | 2022-08-09 16:00:53 | administrator | | 217402543 | josef | josef | josef@xxx.xxx | 2022-08-09 15:59:24 | administrator | +-----------+---------------+---------------+----------------------------------+---------------------+---------------+

            But none of the credentials for those users work.

            What's going on?!? 😞

            I use Cloudron with Gandi & Hetzner

            girish 1 Reply Last reply Reply Quote 0
            • girish
              girish Staff @jdaviescoates last edited by

              @jdaviescoates Could it be because the app was installed with LDAP enabled?

              jdaviescoates 1 Reply Last reply Reply Quote 1
              • jdaviescoates
                jdaviescoates @girish last edited by

                @girish nope, not that. I thought the same but have already tried again leaving access to the app.

                I use Cloudron with Gandi & Hetzner

                1 Reply Last reply Reply Quote 0
                • robi
                  robi last edited by

                  I remember having a similar issue, and I ended up simply changing the admin pw via the db commands to nothing, then logging in and updating it.

                  Life of Advanced Technology

                  jdaviescoates 1 Reply Last reply Reply Quote 0
                  • jdaviescoates
                    jdaviescoates @robi last edited by jdaviescoates

                    @robi thing is, I've already used that pw reset tool to effectively do that. The problem is that for some reason correct credentials just don't work.

                    I use Cloudron with Gandi & Hetzner

                    micmc 1 Reply Last reply Reply Quote 0
                    • jdaviescoates
                      jdaviescoates last edited by jdaviescoates

                      WP CLI to the rescue!

                      Solved it by opening the app web terminal and doing this:

                      wp cache flush

                      Then I could login again!

                      Now to start again with a clean slate in case my tinkering has left a mess

                      Edit: turns out it wasn't just flushing the cache that that fixed it! Seems I had to use the reset password tool first and then flush the cache and then login using that new login in a private browsing tab, and then I could login and then I was away.

                      So, basically what resolved this was:

                      1. using the resetpass.php tool to reset the admin user pw to servmask
                      2. flushing the cache using wp cli i.e. type wp cache flush into the app web terminal
                      3. login in an incognito/ private tab using the credentials from the resetpass.php tool
                      4. editing/ updating the passwords of other users (even after getting access none of the old pw worked before anymore)
                      5. delete the resetpass.php tool

                      (but perhaps the suggestion by @micmc would've worked too. Edit: nope, that wouldn't have helped - the wpconfig.php files before and after migration were identical.)

                      I use Cloudron with Gandi & Hetzner

                      1 Reply Last reply Reply Quote 0
                      • Topic has been marked as a question  jdaviescoates jdaviescoates 
                      • Topic has been marked as solved  jdaviescoates jdaviescoates 
                      • micmc
                        micmc @jdaviescoates last edited by

                        @jdaviescoates You might have overwritten the wp-config.php file created by cloudron install, with the wp-config.php file in your migration file.

                        There's nothing to prevent you from redoing the process since you already have the migration file on hand.

                        So, simply scrap this install. Reinstall WordPress with Cloudron and make a backup of the wp-config.php file before migrating. Then upload and overwrite the wp-config.php file with the one created with cloudron that you've just backed up.

                        All should work as normally now.


                        https://marketingtechnology.agency
                        For cutting edge web technologies

                        jdaviescoates 1 Reply Last reply Reply Quote 1
                        • jdaviescoates
                          jdaviescoates @micmc last edited by jdaviescoates

                          @micmc thanks, that might well have done it too, who knows?

                          Perhaps I'll give that a try at some point!

                          Edit: nope, that wouldn't have helped - the wpconfig.php files before and after migration were identical.

                          I use Cloudron with Gandi & Hetzner

                          micmc 1 Reply Last reply Reply Quote 0
                          • micmc
                            micmc @jdaviescoates last edited by micmc

                            @jdaviescoates said in Cannot login to site after migrating a wordpress.com site to Cloudron:

                            @micmc thanks, that might well have done it too, who knows?

                            Perhaps I'll give that a try at some point!

                            Edit: nope, that wouldn't have helped - the wpconfig.php files before and after migration were identical.

                            Perhaps I'll give that a try at some point!

                            Edit: nope, that wouldn't have helped - the wpconfig.php files before and after migration were identical.

                            Huh? That's just impossible mate.
                            You see, wp-config files holds database credentials. So when you migrate form another server, the wp migration file will carry the wp-config file with db connect credentials from that server.

                            Now, you need to install a fresh WordPress before migrating the site, so how can the cloudron install provide the sames db connect credential as the other site had? Might have you mixed the wp-config files?


                            https://marketingtechnology.agency
                            For cutting edge web technologies

                            jdaviescoates 1 Reply Last reply Reply Quote 0
                            • jdaviescoates
                              jdaviescoates @micmc last edited by jdaviescoates

                              @micmc said in Cannot login to site after migrating a wordpress.com site to Cloudron:

                              That's just impossible mate.

                              Nah, it's simple really. Evidently the migration plugin doesn't overwrite the wpconfig.php file when it does the migration (which makes sense as like you say, that would mess with the db connection and break everything)

                              Anyways, I've sorted my issue by using the resetpass.php tool, using wp cli to flush the cache then logging in in a private/ incognito tab, then changing the passwords of the other users and changing the one that was changed by resetpass.php back to what it was before, then deleting the resetpass.php tool

                              Seems the issue is somehow the migration plugin borked all the passwords.

                              I use Cloudron with Gandi & Hetzner

                              micmc 1 Reply Last reply Reply Quote 1
                              • micmc
                                micmc @jdaviescoates last edited by

                                @jdaviescoates 👍 😊


                                https://marketingtechnology.agency
                                For cutting edge web technologies

                                1 Reply Last reply Reply Quote 0
                                • d19dotca
                                  d19dotca last edited by

                                  I think I had that issue a long time ago and it was something to do with the Auth-LDAP plugin not saving the passwords in the database, and so if that plugin gets disabled then we can't login 'offline'. The WP CLI will be the best way to work around it I think, as it seems you did already also with the password reset tool too! 🙂

                                  --
                                  Dustin Dauncey
                                  www.d19.ca

                                  1 Reply Last reply Reply Quote 2
                                  • First post
                                    Last post
                                  Powered by NodeBB