I have worked within a web development company where we had our local machines, a staging server and a a number of production servers. We worked on macs in perl and used svn to commit to stage, and perl scripts to load to production servers. Now I am working on my own project and would like to find good practices for web development when using shared web hosting and not working from a unix based environment (with all the magic I could do with perl / bash scripting / cron jobs etc)
So my question is given my conditions, which are:
I have some PHP personnal-projects on shared-hosting ; here are a couple of thoughts, from what I'm doing on one of those (the one that is the most active, and needs some at least semi-automated synchronization way) :
A few words about my setup :
Now, How I work :
What I did before :
What I do now :
A couple of notes about that way of doing things :
The only thing "special" here, which might be "linux-oriented" is using rsync ; a quick search seems to indicate there is a rsync executable that can be installed on windows : http://www.itefix.no/i2/node/10650
I've never tried it, though.
As a sidenote, here's what my rsync command looks like :
rsync --checksum \ --ignore-times \ --human-readable \ --progress \ --itemize-changes \ --archive \ --recursive \ --update \ --verbose \ --executability \ --delay-updates \ --compress --skip-compress=gz/zip/z/rpm/deb/iso/bz2/t[gb]z/7z/mp/mov/avi/ogg/jpg/jpeg/png/gif \ --exclude-from=/SOME_LOCAL_PATH/ignore-rsync.txt \ /LOCAL_PATH/ \ USER@HOST:/REMOTE_PATH/
I'm using private/public keys mecanism, so rsync doesn't ask for a password, btw.
And, of course, I generally use the same command in "dry-run" mode first, to see what is going to be synchorised, with the option "
ignore-rsync.txt contains a list of files that I don't want to be pushed to production :
.svn cache/cbfeed/* cache/cbtpl/* cache/dcstaticcache/* cache/delicious.cache.html cache/versions/*
Here, I just prevent cache directories to be pushed to production -- seems logical to not send those, as production data is not the same as development data.
(I'm just noticing there's still the "
.svn" in this file... I could remove it, as I don't use SVN anymore for that project ^^ )
Hope this helps a bit...