Lately I’ve been favoring SSH to upload/delete files from a server since it’s faster and I feel it gives me more control/power, but I still use a regular FTP client for most of my daily use (since I don’t have SSH access to all servers), this is just a very basic tip that some people may not be aware of and that can boost productivity and reduce downtime during updates.
The Workflow
- Upload new files to a
_swap
directory.
- Move current files to a
_backup
directory.
- Move new files from
_swap
to the parent directory.
- Test live files.
- Delete files inside the
_backup
directory.
- Win one free internet.
Why?
The main reason is because moving files on FTP is way faster than deleting them, specially if you are moving the files to a parent directory, it can reduce the downtime from a couple minutes to a few seconds depending on how many files you are updating.
Another reason is that you will have a backup of the current files on the server and you can easily revert the changes in case anything goes wrong. - You should also keep all source files on a version control system and make updates when the site has as few users as possible (usually from 9pm to 9am) to reduce the chance of ruining everything…
That’s it!