title: Uploading PHP scripts to a live environment
body: <p>I have a PHP app that requires semi-frequent code updates. What I do now is that I bring down the app for maintenance whenever I have to upload new scripts, effectively turning the app off for all users except myself.</p>
  
  <p>If I don't do this I always see a lot of "unexpected $end" error messages in the logs, as PHP tries to interpret half-uploaded scripts. Which I of course want to avoid.</p>
  
  <p>My question is: Is there a safe way of doing this without bringing the app down for maintenance? In an environment with a lot of simultaneous users, would uploading to a temp directory and then moving the files locally on the server be fast enough to avoid those errors? Can it be automated somehow for a convenient workflow?</p>
  
  <p>Thanks!</p>