Copying files into the live directory means the site serves a half-updated tree for the duration — new templates against old classes, for as long as the copy takes. Building beside it and switching a symlink makes the change atomic.
releases/
20160913091422/
20160914140301/
shared/
storage/
.env
current -> releases/20160914140301
ln -sfn releases/20160914140301 current.tmp && mv -Tf current.tmp current
The ln then mv dance is the part that matters: ln -sfn onto an existing symlink is not atomic, while a rename over it is. Anything that must survive a release — uploads, logs, the environment file — lives in shared and is symlinked in. Rolling back is the same command pointed at the previous directory, which is what makes it a rollback rather than a redeploy.