Editing XML files to change links
-
I don’t think this is a question for the .ORG forum. If I were to move from here to a self-hosted blog using .ORG software (which I was planning to get away from the Beep Beep Boop editor), there’s a problem transferring my archive of old posts to the new site. The export-import function should accomplish the transfer, but most of my posts contain at least one link to an earlier post on the same topic, and earlier posts are often edited to add links to later ones.
At the new site, all of those links would be wrong, because they point to my posts at this website. I could leave a copy of my archives here so those links would still work, but if I made this site private after the move, those links wouldn’t work. The links should be changed to point to the transferred archives at the new site, but there are so many that it’s impossible to do it post-by-post.
Assuming the URL structure of posts at the new site is the same as here (domain, date, and post name), the links could be fixed with a search-and-replace operation on the XML files before they’re imported to the new site, changing the domain name in each link from this site to the new one. Can anyone recommend a program that can edit XML files to accomplish this? Is there some other way to update links that doesn’t require editing each individual post? (I’m not moving anywhere now that the old editor is still available, so this isn’t urgent, but it’s useful to know how to accomplish this if I ever do decide to move, and I can’t be the only one with this question.)
The blog I need help with is: (visible only to logged in users)
-
Hi,
I just usually use Notepad or Wordpad to edit XML files and really any text editor, you can use.
Just make sure you make a copy of your XML file so in case you make a mistake, you can revert to the original one.
Good luck!
-
I think the import process fixes the links for you – worth a bit of testing before spending a lot of time with a text editor
I like NotePad+
-
Thanks for the responses. I had just about given up on this question. I’ll try your ideas out if the time ever comes when I have to move, but so far, we’re still able to avoid Beep Beep Boop.
One “solution” I thought of was not to worry about it, even if we lose the classic editor. I can always compose, edit, and preview new posts at my new ORG site (which now exists but which I’m not using), and then I can copy the draft and post it here. Everything will stay where it now is, and all the internal links will continue to work. I’ll just be using an off-site editor.
- The topic ‘Editing XML files to change links’ is closed to new replies.