Lorna Mitchell has a handy tip you can use in deploying your (linux-based) PHP applications - a one-step symlink switch that can make toggling between deployed versions of your code simple.
When I deploy an application, which is almost invariably a PHP application, I like to put a whole new version of the code alongside the existing one that is in use, and when everything is in place, simply switch between the two. As an added bonus, if the sky falls in when the new version goes live, the previous version is uploaded and ready to be put back into service.
The single command avoids having to remove a current symlink and recreate it, possibly causing issues if something happens in between. Instead she uses the "mv" (move) command to push the current symlink over to a new location. Reducing the process to one step also minimizes the risks of deployment.