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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. Very bizarre issue with cloned app

Very bizarre issue with cloned app

Scheduled Pinned Locked Moved WordPress (Developer)
12 Posts 5 Posters 2.0k Views 5 Watching
  • 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.
  • martinkbsM martinkbs

    @jdaviescoates Is there any caching plugin active in the first instance before cloning the app?

    jdaviescoatesJ Online
    jdaviescoatesJ Online
    jdaviescoates
    wrote on last edited by jdaviescoates
    #3

    @martinkbs no, no caching plugins are installed.

    I've tried using the Better Search and Replace plugin to replace all instances of subdomain1.something.coop to subdomain2.something.coop and that temporality fixes most (but seemingly not all) links.

    Look at this video. You should just be able to make out that the link I hover over is goop.development.coop (if you view full screen and look in bottom left corner) but then as soon as I edit the page and look at the exact same link somehow it's actually goopagain.development.coop (no idea why the video is so low res until the end)

    huh? 🤷

    I use Cloudron with Gandi & Hetzner

    imc67I martinkbsM 2 Replies Last reply
    0
    • jdaviescoatesJ jdaviescoates

      @martinkbs no, no caching plugins are installed.

      I've tried using the Better Search and Replace plugin to replace all instances of subdomain1.something.coop to subdomain2.something.coop and that temporality fixes most (but seemingly not all) links.

      Look at this video. You should just be able to make out that the link I hover over is goop.development.coop (if you view full screen and look in bottom left corner) but then as soon as I edit the page and look at the exact same link somehow it's actually goopagain.development.coop (no idea why the video is so low res until the end)

      huh? 🤷

      imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by
      #4

      @jdaviescoates

      use this in the app CLI:

      wp search-replace https://domain1.coop https://domain2.coop --dry-run
      

      You see the dry run results, if there is something to change just do it again without --dry-run

      jdaviescoatesJ 1 Reply Last reply
      2
      • imc67I imc67

        @jdaviescoates

        use this in the app CLI:

        wp search-replace https://domain1.coop https://domain2.coop --dry-run
        

        You see the dry run results, if there is something to change just do it again without --dry-run

        jdaviescoatesJ Online
        jdaviescoatesJ Online
        jdaviescoates
        wrote on last edited by
        #5

        @imc67 thanks, that is pretty much exactly what the Better Search and Replace plugin does, but it doesn't resolve the issue.

        I mean, I'll try this method too, but I'm willing to bet it won't make any difference...

        I use Cloudron with Gandi & Hetzner

        jdaviescoatesJ 1 Reply Last reply
        1
        • jdaviescoatesJ jdaviescoates

          @imc67 thanks, that is pretty much exactly what the Better Search and Replace plugin does, but it doesn't resolve the issue.

          I mean, I'll try this method too, but I'm willing to bet it won't make any difference...

          jdaviescoatesJ Online
          jdaviescoatesJ Online
          jdaviescoates
          wrote on last edited by
          #6

          @imc67 yep, as I've already done that using the plugin, there were no cells to replace.

          But if I go to edit the homepage the links in the blocks are suddenly goopagain again. F-ing weird. It's almost like the block links aren't stored in the db or something.

          I use Cloudron with Gandi & Hetzner

          1 Reply Last reply
          0
          • jdaviescoatesJ jdaviescoates

            @martinkbs no, no caching plugins are installed.

            I've tried using the Better Search and Replace plugin to replace all instances of subdomain1.something.coop to subdomain2.something.coop and that temporality fixes most (but seemingly not all) links.

            Look at this video. You should just be able to make out that the link I hover over is goop.development.coop (if you view full screen and look in bottom left corner) but then as soon as I edit the page and look at the exact same link somehow it's actually goopagain.development.coop (no idea why the video is so low res until the end)

            huh? 🤷

            martinkbsM Offline
            martinkbsM Offline
            martinkbs
            wrote on last edited by
            #7

            @jdaviescoates In principle, if you have followed the steps in Cloudron's WordPress migration guide (https://docs.cloudron.io/guides/migrate-wordpress/), you should not have any problems.

            The command to replace urls has never given me any problems:

            # sudo -E -u www-data /app/pkg/wp --path=/app/data/public/ search-replace 'https://old.cloudron.space' 'https://new.cloudron.space'
            
            # sudo -E -u www-data /app/pkg/wp --path=/app/data/public/ cache flush
            

            What can happen is that the destination url of the WordPress block is encoded in the database and the search-replace statement does not find it, for example:

            https://goopagain.development.coop
            

            can be in the database as

            https%3A%2F%2Fgoopagain.development.coop
            

            It is unusual, but on occasion it can happen.

            jdaviescoatesJ 1 Reply Last reply
            2
            • martinkbsM martinkbs

              @jdaviescoates In principle, if you have followed the steps in Cloudron's WordPress migration guide (https://docs.cloudron.io/guides/migrate-wordpress/), you should not have any problems.

              The command to replace urls has never given me any problems:

              # sudo -E -u www-data /app/pkg/wp --path=/app/data/public/ search-replace 'https://old.cloudron.space' 'https://new.cloudron.space'
              
              # sudo -E -u www-data /app/pkg/wp --path=/app/data/public/ cache flush
              

              What can happen is that the destination url of the WordPress block is encoded in the database and the search-replace statement does not find it, for example:

              https://goopagain.development.coop
              

              can be in the database as

              https%3A%2F%2Fgoopagain.development.coop
              

              It is unusual, but on occasion it can happen.

              jdaviescoatesJ Online
              jdaviescoatesJ Online
              jdaviescoates
              wrote on last edited by
              #8

              @martinkbs said in Very bizarre issue with cloned app:

              In principle, if you have followed the steps in Cloudron's WordPress migration guide

              I couldn't do that as it was a WordPress.com hosted WordPress site and unlike self-hosted WordPress you can't just simply download the export file (f-ing stupid, I know). Instead it emails a download link (and it emailed it to an email address I don't have access to).

              @martinkbs said in Very bizarre issue with cloned app:

              https%3A%2F%2Fgoopagain.development.coop

              I think a search/ replace for just goopagain.development.coop (without any https:// nor https%3A%2F%2F) ought to still find that though, no?

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply
              0
              • jdaviescoatesJ Online
                jdaviescoatesJ Online
                jdaviescoates
                wrote on last edited by jdaviescoates
                #9

                Well, I've no bloody idea what was going on there.

                In the end I tried this:

                1. Backing up (the broken) goop.development.coop
                2. Saving the backup
                3. Uninstalling goop.development.coop
                4. Backing up goopagain.development.coop
                5. Changing the location of goopagain.development.coop to goop.development.coop
                6. Backing up again
                7. Running wp search-replace goopagain.development.coop goop.development.coop in the Web Terminal for the app

                Seem to now be working as expected! 😄

                Literally have no idea why just cloning and doing a search/ replace didn't result in the exact same thing, but there you go. Bizarre.

                I use Cloudron with Gandi & Hetzner

                micmcM 1 Reply Last reply
                1
                • robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #10

                  What did you use to migrate the WP site?

                  May be wiser to start with a different approach from the get-go.

                  Conscious tech

                  1 Reply Last reply
                  1
                  • jdaviescoatesJ jdaviescoates

                    Well, I've no bloody idea what was going on there.

                    In the end I tried this:

                    1. Backing up (the broken) goop.development.coop
                    2. Saving the backup
                    3. Uninstalling goop.development.coop
                    4. Backing up goopagain.development.coop
                    5. Changing the location of goopagain.development.coop to goop.development.coop
                    6. Backing up again
                    7. Running wp search-replace goopagain.development.coop goop.development.coop in the Web Terminal for the app

                    Seem to now be working as expected! 😄

                    Literally have no idea why just cloning and doing a search/ replace didn't result in the exact same thing, but there you go. Bizarre.

                    micmcM Offline
                    micmcM Offline
                    micmc
                    wrote on last edited by
                    #11

                    @jdaviescoates said in Very bizarre issue with cloned app:

                    Literally have no idea why just cloning and doing a search/ replace didn't result in the exact same thing, but there you go. Bizarre.

                    Might have something to do the settings of your permalinks.

                    At your first trial had you set them the same as they previously were on the original hosting platform?

                    Look at this closely next time, this is often what causes broken links issues. That's without knowing how you processed your migration at first from the old site.

                    Ignorance is not an excuse anymore!
                    https://AutomateKit.com

                    1 Reply Last reply
                    0
                    • jdaviescoatesJ Online
                      jdaviescoatesJ Online
                      jdaviescoates
                      wrote on last edited by jdaviescoates
                      #12

                      I used the All in One Migration plugin that has always worked great before (but think this is the first time I've used it with a wordpress.com site)

                      And yeah, whilst I had saved permalinks on goopagain, perhaps a good ol' go hit save on permalinks over on goop might've done the trick 🤷

                      I use Cloudron with Gandi & Hetzner

                      1 Reply Last reply
                      1
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search