Php deployment to remote server using FTP from SVN after each commit

user312729 picture user312729 · Apr 9, 2010 · Viewed 7.2k times · Source

I coudn't find the solution for Php deployment to remote server using FTP from SVN after each commit. How can I upload to server by FTP the only added or edited files and delete the deleted files from SVN I think about write post-commit script...

Answer

Pekka picture Pekka · Apr 9, 2010

Good question!

I'm not sure a PHP-only approach to syncronizing files that way exists.

I would usually use third-party FTP sync tools like rsync or ScriptFTP (commercial) to do the syncronizing part.

Take a look into phing, there are a number of FTP extensions (called "tasks") for it. I have no real world experience with them though.

This blog post offers a number of ideas and approaches: Using phing to sync files with shared hosting