What is the best and most efficient way to set up two versions of the same website?
I want one version that is online and open for everyone to use but I also want a developer version where I can develop and test new things instead of doing that against the ftp.
Currently I have MAMP setup on my developing machine and I use Git for version control.
In MAMP/XAMPP the location for the files are localhost/example/
and on the ftp it is the host's (Dreamhost's in this case) file structure. Something like /home/username/example.com/
. That results in having multiple versions of pretty much the same file. This isn't that efficient but I can't come up with a good solution for it. Are there any?
It would be perfect if I wanted to add a new feature to the website I could do that in MAMP and when i commit the changes with Git it uploads the changes to the ftp.