Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

igsm '
igsm '
10,440 Points

How to manage a website in development and production stages?

What is the best practice in managing development and production versions of the website and its subsequent updates?

Should I have two servers; for development and production separately or are there other ways in managing these stages?

What is the process of updating application without interrupting the current service?

2 Answers

Hi guy! You can do it in many different ways. One of them is, if you have enough space in your server, is to have your site inside a folder in the server and to create another folder for testing your code. In this case you must have a different adress to access your test pages, like www.mydominium.com/indextesting.html, then all the links for your pages must be changed completing everyone with the "testing" completion. You must be careful in managing that to not open this testing code to everyone.

You can also install a program like Apache and have your own local serve for development, what is really much more safe.

Austin Whipple
Austin Whipple
29,712 Points

The best way would be to have two functioning versions of your site tracked in some type of version control system. git is currently the most popular and is incredibly easy to use, particularly though GitHub.

You don't necessarily need two entirely different servers, but two separate subdomains would be helpful (www.mysite.com and dev.mysite.com). As long as all the necessary files are in their own directories, it'll work fine.

I'd recommend getting started with the git courses offered by Treehouse.