Contributed by SrNupsen
On this page... (hide)
If you're like me, you like to develop your web pages in quiet surroundings, with nobody hanging over your shoulder yelling "Oh, that <div> is REALLY out of line!" or even "I can't login to Coranto!!" ("I haven't installed it yet, so shut up!").
Well anyway, you would want to install Coranto, set everything up, and then copy the whole site over to to it's new and more publicly available home. But there are a number of pitfalls. This is an attempt to list the possible things that might go wrong, but there are surely things I have forgotten about. If you spot anything or have any experiences to share, please leave a note in the forums over at the Official Site.
Yes, it's a rather dull advice for most of you. Ofcourse you backup your data regularly. Or don't you? OK then, proceed at your own risk. Hopefully you have the spare time on your hands to recreate your site from scratch if something goes terribly wrong.
The most practical thing to do is to stuff everything into a .zip file, download it to your computer, upload it to the new site and unpack it there. I'm using Unix servers, so all the examples will be Unix-specific. I'm quite sure you can do exactly the same things on a Windows server, but the syntax will be slightly different and you will have to look it up yourself.
Coranto not working anymore? Tons of 404's and other errors? Yup. No wonder, since EVERY path has probably changed from the old to the new location. Now this is where we are going to take advantage of the fact that Coranto stores all of its settings in plain text. We are going to use a tool called rpl, which replaces text in files and can recurse into subdirectories. It's also one single executable file, so you shouldn't have any problems running it on your server (they would be VERY VERY strict not to allow you to). Just download it using wget or a similar tool, or even download it to your local computer and upload it via FTP to your new www root directory. Go here to download.
Next, we are going to replace EVERYTHING. All your Coranto profiles, styles, settings, viewnews.cgi, coranto.cgi, anything that could possibly have your old path in it. To do this, get hold of the ABSOLUTE path to your OLD installation. Then the one to your NEW installation. I will use /home/old/www/dev/coranto and /www/public_html/coranto as an example of old and new, and the command will be this:
'rpl -iRa "home/old/www/dev/coranto" "www/public_html/coranto" *'
You probably guessed what this does allready. The -i flag is for ignore case (which is probably superfluous since nix file systems are case-sensitive anyway), the -R is to recurse into subdirectories and the -a is to process files and directories starting with a dot (.) as well. Note that both of the strings are enclosed in quotation marks.
Tam tam tam. All done. Almost. Now all we have to do is to replace all occurences of the URL as well. If the old URL to Coranto was http://dev.myoldsite.com/coranto and the new one is http://www.finished.com/coranto, then just do:
'rpl -iRa "dev.myoldsite.com/coranto" "www.finished.com/coranto" *'
This should do the trick for you! If Coranto complains, verify that chmod settings hasn't been altered during the process, that your new server has perl installed (possibly you'll need to change the path to perl in the first line of coranto.cgi and viewnews.cgi) etc. etc. If you still have trouble, why don't come ask us in the forums?
Good luck! SrNupsen