Search code examples
phpnetwork-programmingserverxampp

How do I run a local Xampp server using files from a network drive?


There is a Xampp server running on a network location that I have limited access to. The htdocs folder within Xampp (on the network location) is on a git repository, and I am working on my own branch off of that. I want to be able to run a local server using Xampp of the branch I am working off of. I can't run my changes on the main server. Sorry if this explanation sucks, I can clarify any details. My first idea was to do a symbolic link from my local installation of Xampp to the network drive folders, but I'm not sure if it will work. Or I could just run Xampp and make it look elsewhere for it's files besides the C drive? Any help is greatly appreciated, I'm a bit stuck on this.


Solution

  • If code is stored as git repository there is simple way for you.

    1. Create own local instance of xampp (or any other WAMP stack)
    2. git clone remote-repository /full/path/to/htdocs copy master from remote git repository
    3. Go to your htdocs folder
    4. Switch to your feature branch git checkout -b new-feature-branche
    5. Start xampp

    And here you go, you have your own instance of app.

    Once you make changes in repository, push changes to git instance, create merge request and you are done