How do you guys "update"/"patch" your live website / database?

Hey guys,

I know, that this question probably isn’t thaaat much into Yii. But I guess, some of you should know something about that. :wink:

I’m looking for a good solution to patch the live website. One idea was to install subversion on the live machine and just update from there … but what about files like “config.php” etc.? … here I’ve got different databases inside … but sometimes this file has changes as well … same for index.php etc.

The second question would be, how you guys "update"/"refresh" the database … if something changed …

… do there exist any good systems, which can make these things easier?

Thanks in advance,


I use migrations for the database, and for the site I just use FTP and overwrite older files (based on timestamps).

When using FTP, you need to configure the difference between local times and server times, otherwise it will fail.

Works for me. :)

What do you exactly mean by "migrations for the database"?

The rest of it I do the same way, via FTP … but I think it’s a bit annoying from time to time … because there are always some files, like I sayed before (config/main.php, index.php, .htaccess, …) which have different configurations on the live website (like logging, debugging mode, database etc etc.). Short: it’s more than 3 things to change afterwards again, so that it can happen sometimes, that I forget about some of the configurations and stuff …

does there no script or something like that exist, which for example "exports" a generated patch in a seperate folder with the same folder structure, but just the changed files in it … something like that i thought of. Or maybe a combination of that and a subversion checkout on the live server. :wink:

Thanks a lot in advance,


I was also going to post a topic similar to this.

I want to know how I can easily update code/data on several servers that will be running an application I am creating in Yii.

I think Subversion may be the best option, since it can revert to previous files if the update broke the system. But what if the servers don’t support Subversion?

Subversion sucks - both because it insists on having a .svn directory in every directory, and because it requires a server installation.

Git or Mercurial is far better because all it needs is a local install. No difference between server/client.

You can use Git and RSync together, like this:

I haven’t really tried that myself (Git/RSync), but I’ve tried Mercurial.

And I think I just discovered that it wasn’t for me: you have to pull on the server.

The difference from FTP is that you push to all your clients - opposite method.

It really works quite well. :lol:

But if you’re feeling adventurous, do read that article.

Thanks for this link … this looks a bit like what I’m looking for … but I’m still open for other / better / “fully automated” solutions :-D.