I have a very small and basic web site on a web server. Usually I'm doing the changes on a localhost where the development version is, and after that I upload it to the server with FileZilla. That's the very obvious way, but it's not the most convenient.

I've worked with SVN, but I've never needed to set anything - just checkout, commit, update. Reading some tutorials I wonder is this the easier way to upload the files to a server? Or are there any easier?


You are specifically asking about the easiest way. That would probably be rsync or scp. Put calls to either in a script or batch file, and uploading is very simple. The difference between the two is scp is a copy - it will upload everything, while rsync will only upload (or download) the differences.

Using source control works nicely too. Log in to your 'live' server, and do a git pull to download the latest updates. I would recommend using github or another service as an intermediary. Push to github from your development environment so you can review the changes, and then pull from the live server to update.


Actually, you’re already using easiest way to upload your files at the server - via FTP of SFTP. If you want to add some ‘magic’ to that workflow, you can use SVN hooks to call some batchfiles and upload files to your server via FTP without your participation. You’ll obviously need to write the batchfile first, and you’ll need to install an FTP service on your server too. You can also install SVN client to the server, create a working copy of your repo at www directory and call ‘svn update’ each minute from cron job. When server found a new commit it will download and install it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.