If you have the opportunity to create an intermediate subdomain on a production server, here is how I would (and did) process it:
Develop on your development machine by storing your code in VCS. I use subversion, but you can find another one that you prefer. After making the changes, you check your code.
On your production server, you create a subdomain in Apache VirtualHost that is identical but isolated from your VirtualHost product. Issue your code from VCS to the intermediate domain of a subdomain. After making the changes, you then start the update from your VCS, which pulls out only the changed files. Installations and manufactures have the same data set, or you may have a separate database for each.
The reason for using a subdomain instead of just another directory is that it allows you to use the same DocumentRoot for production and production. It is also easy to determine where you are if you use something like staging.example.com .
When you are sure that everything works as it seems to you, you can run the VCS update on the production side to update the code.
It is important to make sure that you tell Apache to deny access to VCS metadata directories (.svn, .git, whatever).
Adding
To restrict access to .svn directories, use a rewrite rule, for example:
RewriteEngine on RewriteRule .*\.svn/.* - [F]
This will send 403 to them. You can also redirect them to the main page to make it less obvious, even if they are present.
source share