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 am using a single standard shared web hosting from an external provider (with ssh access)
- I am working with at least one other person and intended to use SVN for source control
- I am developing php/mysql under Windows (but using linux is a possibility)
What setup do you suggest for testing, deployment, migration of code/data? I have a xampp server installed on my local machine, but was unsure which methods use to migrate data etc under windows.
I have some PHP personal 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 :
I’m using private/public keys mechanism, so rsync doesn’t ask for a password, incidentally.
And, of course, I generally use the same command in "dry-run" mode first, to see what is going to be synchronised, with the option "
--dry-run"And the
ignore-rsync.txtcontains a list of files that I don’t want to be pushed to production :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 any more for that project ^^ )