Very bizarre issue with cloned app
-
I migrated an instance of WordPress over to Cloudron to
subdomain1.something.coop
.I then backed it up and cloned it over to a new sub-domain
subdomain2.something.coop
Now, whenever any edits are made (or, not even made, as soon as one even goes into an edit screen) to a page on the WordPress all the links on the revert back
subdomain1.something.coop
, breaking all the link and images.WTF?
I completely baffled as to what could be going one here?
Any ideas?
-
@jdaviescoates Is there any caching plugin active in the first instance before cloning the app?
-
@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
tosubdomain2.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 actuallygoopagain.development.coop
(no idea why the video is so low res until the end)huh?
-
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
-
@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.
-
@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.
-
@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?
-
Well, I've no bloody idea what was going on there.
In the end I tried this:
- Backing up (the broken) goop.development.coop
- Saving the backup
- Uninstalling goop.development.coop
- Backing up goopagain.development.coop
- Changing the location of goopagain.development.coop to goop.development.coop
- Backing up again
- 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.
-
@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.
-
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