This question already has an answer here:
-
WordPress Access
2 answers
How can 2 people develop a website on a local host with different computers?
We would like to create a website for a company, but not on a host whilst it is live. Ideally we would like to have it live once we have finished but we are working from two different computers.
Does anyone know how we could simultaneously work on this with different computers?
Yes and no. One of the computers can have a server installed on it that runs only on your local network. Or you can have another computer on your local network with a server installed on it there that you both network into but then it's not "localhost". Or you can network into your other devs computer while he works on the files on his computer as "localhost".
If you specifically want to have the same set of files running on your own local servers you can broadcast your localhost through a secure tunnel which the second developer can connect into.
You can also develop inside a Dropbox folder on your local machine and share the folder. I've seen this a lot. Here's an example of how this it's done: https://www.youtube.com/watch?v=Irq-uJA-aaA.
The most preferred way to collaborate with another developer and work on a project simultaneously, is to use a distributed version control system like Git/GitHub. I'd recommend looking into that.