Version Control for Web Sites |
Version Control for Web Sites |
RowanB |
Sep 6 2010, 10:43 AM
Post
#1
|
Group: Members Posts: 3 Joined: 29-September 09 Member No.: 9,893 |
What's the best way of achieving version control for a published web site?
Like thousands of others, I look after several small web sites for myself and my family and for various organisations that I belong to. I develop the web pages either directly in HTML and CSS, or using my favourite web authoring tool of the moment (usually freeware or open source tools). I also often use PHP, Python, ASP and other scripting languages. Some of my sites use MySQL or MS SQL databases. When I've developed some new content I then up-load the changed files to the shared web server of my hosting provider using FTP. BeyondCompare (a great program) is my favourite way of doing this. I don't have a fully configured web server at home, so uploading to my web hosting company's server is the only way I have of testing my content. What I need now is a way of updating the web site in such a way that certain people to whom I've given a password (often officers of the voluntary organistation whose web site I'm working on) can view the new content, but that other users (including the general public) continue to see the old site. Only when I've got approval from everyone who needs to give it do I want to make the changes live, so everyone can see them. I would prefer not to have to have two complete copies of the site on the web server, one password protected and one not. This is because:
What's the best way of doing this? Of course there are many other things that an ideal system should do:
I hope someone can suggest a good way of doing this, preferably with free or cheap software... Thanks - Rowan |
wgabrie |
Sep 6 2010, 06:55 PM
Post
#2
|
Advanced Member Group: Members Posts: 148 Joined: 11-July 10 Member No.: 12,279 |
I have two thoughts on this:
1. You could run a test site in a hidden, obscurely named folder that is completely disconnected from your main site. The test site would just contain empty "lorem ipsum" pages and testing items you want to try. 2. You could create and keep an archive for each version of a page as a distinct file (or database entry) which would still be attached to the main site but, to keeping prying eyes out, its a hidden, custom named, unlinked page. You being the creator of the pages would know the real test page's URL to use for access and testing purposes. So you don't have to build up a new site only to change a paragraph or add an object that only affects one page, but you want to be extra careful while testing the new page not to break any of your site's main databases. Finally, when you are done testing the page you can use the redirect ability of a server-side script or .htaccess file's 301/302 redirect, if you have an apache web server, to move your site's static URL between different versions of the page. This post has been edited by wgabrie: Sep 6 2010, 07:18 PM |
wgabrie |
Sep 7 2010, 09:31 AM
Post
#3
|
Advanced Member Group: Members Posts: 148 Joined: 11-July 10 Member No.: 12,279 |
Here is a page on how to do 301 redirects in several programing languages: 301 Redirect - How to create Redirects
|
Darin McGrew |
Sep 7 2010, 11:15 AM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
I would prefer not to have to have two complete copies of the site on the web server, one password protected and one not. This is because: I would recommend having a complete staging environment because:
What's the best way of doing this? I think the best way is to create a separate staging environment. But you seem to have rejected that idea. |
Lo-Fi Version | Time is now: 19th April 2024 - 02:52 PM |