I do PHP Development on WAMP but sometime it don't work properly when I upload the files to a Linux server, its involve a lot of testing and annoying.

I am looking for a solution to do PHP Development on Windows but the files will be sync with Linux Server. I do not want to use SFTP/SSH clients like WinSCP to view or edit files.

I was told to look at vagrant, is there any other solution?

  • What happens exactly when it "don't work properly"? Are there recurrent problems?Maybe you have hardcoded windows paths or directory/file access assumptions?
    – Chedy2149
    Aug 17, 2013 at 21:49
  • I don't want to go into details what it dont work but there is a few possible reason like files permission, open source library file only work on linux, PHP modules, etc. Now I am more interested to work on Linux Environment now.
    – user88432
    Aug 17, 2013 at 21:53

3 Answers 3


I recommend using VirtualBox to run a Linux instance within your Windows environment. Install Linux on VirtualBox and you'll be able to share a directory between the two, meaning you can edit your files locally within Windows and they're immediately available on your web server running within the Linux instance. Install the same Linux distro and version as your live server for accurate testing.

  • How is that different from vagrant? Because with vagrant you can do the same thing.
    – user88432
    Aug 17, 2013 at 21:54
  • Virtualbox is the platform for hosting your virtual machine (linux). Vagrant works on top of that to set up your specific environment requirements.
    – Matt S
    Aug 17, 2013 at 22:01
  • Vagrant is much easier to manage, pretty much to the point of making using VirtualBox directly a complete waste of time. vagrantbox.es will likely have the version you need.
    – Jordan
    Aug 18, 2013 at 2:16

I think the obvious answer is to set up a standalone local linux box. It doesnt have to be a heavy duty machine - just enough to run Apache & MySQL. You dont even need a GUI on it. Then set up Samba on it so you can have Windows shares. After that you'll be able to open and save files like you would on a normal networked Windows PC.

Another thing to consider is if you are using standalone FTP clients to transfer files now, look at switching to an editor that supports remote file loading & saving natively. For example, w/ Eclipse & the Remote Systems plugin, you can open & save remote files via ssh very easily.


Php is meant to be cross-platform, but if you hard code windows specific things in your php code (Like Paths) or making assumptions about directory/file permissions things might not work the cross-platfrom way.

  • Try this article for portable paths : Write file manipulation cross-platform PHP code
  • Use htaccess files for specifying permissions on project specific files.
  • Like @Matt S suggested use a Virtualized Linux environement to test your code in target environement (Automated tests are preferred by the way)
  • Like I said I am more interested to work on Linux Environment now. I no longer want to do testing and development on Windows Environment.
    – user88432
    Aug 17, 2013 at 22:06

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