Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a website running off site. When we hire someone I would like to create a test site (a copy of live site) for the new employee to tinker with. I will need to take fresh copies of the Files and Database (basically a snapshot) and allow them to access these copied files and database so they could edit and upload them to see the changes they made as if it was the live site

Basically what is the best practice for creating a copy of a website for testing?

Server is running Linux, PHP, mySQL

share|improve this question

closed as not constructive by Ward, Scott Pack, Lucas Kauffman, Michael Hampton, Jeff Ferland Aug 22 '12 at 21:34

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

I think you forgot to ask a question. – EEAA Jun 28 '12 at 20:12
up vote 6 down vote accepted

For the files you'll probably want to use some kind version control system like svn (or a distributed vcs like git) and have different branches for things like dev, test, and production. That way, you can hire someone and they can check out the dev branch on their machine and make their changes (checking it using a local webserver like using WAMP/XAMPP). As they make changes you want to go live, merge their changes into the other branches to test and, finally, to run live.

As for databases, you can make another smaller instance of mySQL on some server for each of the non-production branches and just migrate the changes through SQL scripts.

The downside is that it requires a bit more infrastructure. For a cheaper/hackier option you can just provide each developer with their WAMP/XAMPP instance and manually set it up to look like the production by copying a DB snapshot and code when they first set it up. While this is probably the 'cheaper' option as far as up-front cost and infrastructure, it will cost dearly when you're trying to manually keep multiple 'dev' sites up to date with no central repository and when you're trying to merge dev changes into the live site.

share|improve this answer

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