I have a virtual machine running I run a local webserver on. I make any changes to the software in the virtual machine, then I manually push the changes.
One avenue I have not yet tried, but it is possible is rsync.
rsync can handle both the files and the database(s).