In October 2002 I changed web host from my free webspace at my ISP, to a specialist web hosting outfit (Nucleus – I’d recommend them: efficient, responsive, and reasonably priced, they have a great setup). In response to my query on the Radio Userland discussion board, Steven Vore kindly posted his notes for what he did when he changed host. His instructions also include a nifty method of changing your old site so that each page on the old site redirects the user to the equivalent page on the new site. (Unfortunately, this didn’t quite work for me, and I have included some alternate instructions in case it doesn’t work for you either. I’m not enough of a Usertalk expert to figure out what went wrong.)
I’ve edited them slightly and re-presented them here, with my annotations.
(First posted 22 November 2002. I’ve since shifted weblog tools and I no longer use Radio Userland.)
Steven starts:
Here are some notes from when I did the same sort of thing, they may (or may not) help.
I had a 2nd PC, to which I could copy my entire Radio install so that I could continue to publish to the old site after getting the new one going. You could probably do this with a backup directory or something.
I just copied the entire Radio folder to a different location (in this case, the desktop of my Mac).
Before publishing to the “new” site,
- use window→weblogData.root and then Edit→Find & Replace→Find and let it replace your old site with your new one (for me that meant find svore.home.mindspring.com replace with steven.vorefamily.net).,
I found that Radio’s find and replace only seemed to work on those outline items that were visible. By choosing “Expand Everything” in the Outline menu you can make everything visible, and thus get to it with find and replace. (Update: there are tools for Radio Userland that can help change all these references for you – try searching for them.)
- find any files left in your www or wwwstories directories that contain the old text and replace it using your favorite editor (or sed, or awk, or perl, or…)
On the MacOS this has to be BBEdit (or the free BBEdit Lite), which you can set to do a find and replace over all the files in the www folder. Windows users looking for a similar tool might like to look at the free text editor called NoteTab, which I’ve found very useful for this sort of thing at my enforced-NT workplace.
- cruise through prefs (http://127.0.0.1:5335/system/pages/prefs) looking for your old address (and email, if you want to change that). 1.1, 2.7 and maybe others that I’ve missed.
- obviously, 1.5 and your #upstream.xml will need to change. I think Lawrence’s post is probably more complete.
Lawrence’s post may be found here.
You can see a sample of the redirect’s results at http://svore.home.mindspring.com/ Jump to that site, sit back and wait.
- Then publish away.
- Once you’re happy that the new site’s working right, you can go back to the old one and leave a redirect behind. This is using another pc, the backup copy of Radio, whatever. It’s got the old upstream info. I was moving from one ftp server to another. If you want to do that, here’s what you put into your #template.txt and #hometemplate.txt:
<meta http-equiv="refresh" content="5;url=<% return string.replace (html.getPageTableAddress()^.radioResponder.adrFileTable^.upstream.url, "svore.home.mindspring.com/", "steven.vorefamily.net/", false) %>">
Replace, of course, “svore.home.mindspring.com/” with your old site, and “steven.vorefamily.net/” with your new site.
This gets the url (.upstream.url)of whatever file’s being currently upstreamed (radioResponder.adrFeilTable^), and replaces (string.replace) one string with another. That all gets stuffed into a meta tag that instructs the browser to jump to the new page. the “5” at the beginning of the content= part is 5 seconds, you can change it to whatever you’d like.
Being a meta tag, it goes inside the section.- Then save those two templates and publish away. (Radio → Publish → Entire Website)
I wasn’t able to make this work: somehow every page on my old site got trapped in a circular redirect. I had no idea how to fix Steven’s script, so my quick and dirty fix was to add a hardcoded redirect into #template.txt and #hometemplate.txt. This redirect pointed to the homepage of my new site.
Not quite as elegant as Steven’s solution, but at least all the visitors landing on my old site (which had a reasonable amount of Google mojo, particularly for the Mainoumi and Dry Stone Walls pages) could then get to my new site.
I also changed the page title to read something like “This site is no longer being updated. Redirecting you to my new site…” etc etc.