2

I've got a PHP application which I help to maintain with one other person. The current process is very 'loose' - files are sometimes updated directly on the server, or on a local machine then copied up manually.

I'm familiar with SVN, but perhaps this isn't the best choice for this type of hosted application?

Basically, what I want is a system that will keep track of any or all changes to files (version control), and will make a package (even just a zip) file, of changed files that I can deploy. The main point here is I want a record of any work done, and the ability to rollback source changes.

Is there anything like this that exists for PHP developers?

halfer
  • 19,824
  • 17
  • 99
  • 186
Jimmy Collins
  • 3,294
  • 5
  • 39
  • 57

4 Answers4

3

Look at mercurial. Here is a good tutorial to get you started.

nmichaels
  • 49,466
  • 12
  • 107
  • 135
3

Subversion is a fine way to maintain source control for this sort of project.

However, it sounds like you are trying to do a deployment (based on a recorded change). For that, you want something like Capistrano or maybe Fabric.

Emil Sit
  • 22,894
  • 7
  • 53
  • 75
  • That's exactly it - I don't want to be doing the deployments to production in a manual fashion, too much room for error. Thanks for links, Capistrano may be exactly what I'm looking for. – Jimmy Collins Dec 01 '10 at 21:06
  • May also want to check out Phing, which a build system written in and specifically for PHP. Although, I personally use Capistrano, and it works great. – Bryan M. Dec 01 '10 at 22:02
1

You've just described version control in a nutshell. There are several systems out there that can do what you want, such as SVN, Mercurial, or GIT. There's no need for a PHP specific solution.

GSto
  • 41,512
  • 37
  • 133
  • 184
  • I'm familiar with SVN, but I haven't found it useful for this particular scenario. I had an SVN repository on my local machine, but the process of determining which files have changed, and copying them to the production environment is still manual, any suggestions for this? – Jimmy Collins Dec 01 '10 at 20:58
  • put SVN on the server, that way you can have your production be a checkout from SVN, and update the files in that manner. This is largely dependent on your server set up though. If it's cheapo shared hosting, this probably isn't going to work. – GSto Dec 01 '10 at 21:47
1

Since you already mentioned Subversion it might be worth looking into Beanstalk. They offer SVN and Git hosting and allow you to set up servers for easy deployment.

Git or Mercurial can also be really handy when "push"ing updates to a live server which essentially is a kind of deployment.

ChrisR
  • 14,370
  • 16
  • 70
  • 107