|Managing multiple web sites|
Preventing accidental over-writing of files
I am pretty new to web site development. I have now created a handful of simple sites for clients.
I use XHTML and CSS etc. and there are a couple of hosting services that I use regularly. I am using FileZilla for FTP.
I am wondering what methods people use to prevent mistakes when they manage multiple sites? For example, since many home pages are named index.html, it could be easy to mistakenly upload the wrong index.html file.
Once a site is fairly stable, I can change the file permissions to prevent accidental clobbering. Should I set up passwords? - and if so, what is the best way of doing this?
I am currently working on three sites, two of which have some more than one identical file name.
Thanks in advance for any/all comments.
Experience (and the occasional near-disaster) has taught me this method:
1. organize local versions of sites identically to the remote file structure,
2. use an ftp program that:
3. use the ftp program's interface to access files for editing (i.e. set up the ftp program's preferences so that you can double click files and launch the appropriate application)
- shows both local and remote files
- automatically switches to the correct set of local files when connecting to a given ftp account
Popular tools such as Dreamweaver allow (or enforce) this kind of setup, but you should be able to configure any reasonably powerful ftp client to do the same. On the Mac I use Transmit (a very capable program but not free), and on Windows I use Filezilla [sourceforge.net] (it's free).
|smells so good|
I follow the process that bedlam outlined with a good ftp client.
|use to prevent mistakes when they manage multiple sites? |
My experience has taught me that no matter how much I try to prevent that error, given enough time it will happen. I made one the other night without realizing it. That sort of error will show if I check my work after processing files. My last mistake caused a redirection error, pretty simple to catch and fix... as long as I check my work. It was a simple matter of the correct file in the incorrect directory.
|Preventing accidental over-writing of files |
A little trick I carried with me from my previous career. When I work on a file, I automatically append a unique extention to the file name, for example myfile-V1.html. I upload the V1 version to my server, rename the original file (myfile-SAVE.php) and then rename the V1 version.
This allows me to maintain my source code locally without overwriting it, and I have a saved (and presumably good) copy of the file on my server. If needed, I can quickly rename the saved version on the server.
The combination of TextMate and Transmit (Mac programs) is invaluable. Transmit has a fantastic "dock send" feature, whereby I can drag a document's icon, or its titlebar icon, to the Transmit icon in my dock, and off it'll go to the correct server, correct document root, and correct directory, automagically.
TextMate makes it even better. TextMate has a hook into Transmit, so that when I'm editing a file in TextMate, I can hit the magic key combination control-shift-S, and TextMate sends the file off via Transmit to the right place.
I never have to think at all anymore about what file goes where. I never have to drill up and down through directories on the remote server/local machine. Transmit and TextMate just know where everything goes.
Thanks for helpful responses.
I do organize my local files exactly the same way as the files are organized on the server.
I am using FileZilla but I haven't been able to figure out how to create a separate session for each website. Presently, I just have one session for each hosting service.
Could you please point me in the direction as to how I could create individual sessions for each site?
I usually the site open in my browser to the pages I am changing and then reload the page IMMEDIATELY to check it. I catch little problems immediately this way - e.g. forgot to save the changes to the CSS file etc.
I am considering using file name extensions on all sites that are initials of the client business name. I will have to change all the navigation, links etc. if I do this but I figured that doing it now would be easier than when I have many more sites to maintain. Then the only vulnerable file is index.html
I thought that I could make the home page something other than index.html and put a redirect to that page in the index.html page and then permit the index.html page read only. This plus file name extensions should be protect me from overwriting one client's file with another. Is this a good idea or is there a better one?
What kind of redirect would I put in the index.html file? Would this hurt anything as far as search engines are concerned?
Regarding multiple versions of the same file and v1 file name extensions - this is ok when I am just making a change to one page but it doesn't allow me to test the navigation. Right now, if I am making lots of changes, I make a copy of the site in a different directory and make the changes there. Then, when I am satisfied, I make a back up copy of the site before I make my changes the current version.
Click File and select "Site Manager".
You can set up separate ftp connections for each site.
If you click on the "advanced" button, you can specify which local folder it should open at the start of the session.
I also use a very organized directory tree for storing my websites...it's very easy for me to just glance at the directory tree in the "local site" window to verify which directory I'm in before I upload.