Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have a PHP project that I\'m currently developing. I\'m nearly finished and I

ID: 649303 • Letter: I

Question

I have a PHP project that I'm currently developing.

I'm nearly finished and I was wondering what is the best practice when it comes to beta testing and deploying updates/changes to the production site?

For example, in order to test out new features, I thought about creating a sub-domain called beta.mysite.com that uses a duplication of the same project files as the production version and a duplication of the mysql db.

Then after I test everything out, I need to export the mysql tables (if I changed the db structure) and copy over the files to the production area.

But how do I do all that with keeping all the data that have been produced during my beta testing?

I'm the only person that works on this project, I currently don't use any versioning tool, just Dreamweaver.

Thanks,

Explanation / Answer

I would highly recommend implementing a VCS for yourself. Even if you are the only developer, it is a great tool to have. You will be able to deploy code easier, undo mistakes in an instant, and track the evolution of the code changes. For this, I have found Mercurial to be a great tool to use given its fast setup and overall simplicity however feel free to use any that you like (git, SVN, etc.).

As far as deploying with a VCS, you can create tags for various releases in your code base and work on multiple releases at once (beta for 2.0, dev for 3.0, etc.). Then, deploying the code from beta 2.0 becomes a matter of running a single command.

For the Database synchronization, I have found DB Deploy to be very helpful for updating my Database to the latest that the current code base requires. This is useful for updating your test environment's database to the appropriate configuration as well. Using this tool, you can make all the changes required with a single command.