I have following development setup for my PHP projects:

  • Working station running on Windows 7 with PhpStorm IDE.
  • GIT for version controlling.
  • CentOS on virtual machine (VirtualBox) with Apache and MySQL (copy of production server).

So far, I've been sharing project's source folders between host and guest systems and it was working quite well only really slow. The reason behind this is that Apache was reading files from remote folder (mounted locally). After doing some research, I found out that this set up can be improved by using disk mapping (Samba) instead of folder sharing. So I did that change. I configured my PhpStorm to automatically deploy files to mapped drive. Everything works like a charm now, except for one problem - when I change branches I need to synchronize project's local folder with the one on mapped drive and that takes time, a lot of time (like branching in SVN). Is there another way to handle this than just working on files directly on mapped drive?

2 Answers 2


The most efficient setup for your configuration would be to git clone the repo via SSH directly into the virtual machine (in a location that's accessible to the SAMBA user), mount the "remote" folder from the VM as a network drive in Windows and use PHPStorm to open the project directly from that drive.

The point is this: edit the project directly from the mapped location, do not use PHPStorm's deployment options to deploy your changes to the mapped drive. It will still be slow, but it should be a bit faster than your current setup.

  • For me, PHPSTORM is slow on large projects via mapped folders in VirtualBox.
    – Meglio
    Apr 5, 2015 at 6:11

I have used a setup similar to yours to do local develoment. In my case, I set up git (actually I use Mercurial, but same idea), and added the VM as a remote on my local repo. I can then check out different branches or commits through an SSH connection to the VM. If the VM has a GUI, you could also manage the remote repo that way. If you pretty much always want the VM to use the latest commit on master, you can even set up a git hook that automatically checks it out when you push up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.