First of all, I don't recommend using FTP for projects where security required. (By FTP connections password and data travels in a non-encrypted format, so it can be stolen easily. The only exception when the uploaded files (probably packages) are signed and the digital signature is checked on the server before doing anything with them. Afaik. PHAR is the default lib for that, but it is relative easy to encrypt and sign any zip file, if you put the signature into the file name. Don't confuse digital signature with md5 or sha1 hash.)
By simple projects with FTP I use git-ftp.
Installation (by windows, but I think it works every system as well)
git bash
$ cd ~
$ git clone https://github.com/git-ftp/git-ftp git-ftp.git
$ cd git-ftp.git && chmod +x git-ftp
$ cp ~/git-ftp.git/git-ftp /bin/git-ftp
Configuration
.git/config
[git-ftp "myscope"]
url = ftp.domain.com/subdir
user = user
password = pass
Initialization
git-ftp catchup -s myscope //by this the FTP and the local copy must be in perfect sync
Upload
git ftp push -s myscope
You have to use a .git-ftp-ignore file to define what you don't want to upload.
I usually use git-ftp with git merge and commit hooks.
.git/hooks/post-commit
.git/hooks/post-merge
#!/bin/sh
branch=`git rev-parse --abbrev-ref HEAD`
if [ $branch == "master" ]; then
git ftp push -s myscope
fi
With those git-ftp automagically uploads by any changes of the master branch. Ofc I use master branch for releases only, for development I use another branches...
Settings | Deployment | Options? BTW -- why comparing "by content"? Have you tried compare by "timestamp and size" -- should be faster (although still slow if website is big and connection is slow). - LazyOne