freelance84 Posted June 24, 2011 Share Posted June 24, 2011 I have several updates to a site i wish to implement over the next year or so but i know i will have to test the updates before going live with them. http://stackoverflow.com/questions/4873261/uploading-php-scripts-to-a-live-environment What is the best way to test any new features you might want to add to a script which is already live? The above link talks about 'Symlink ' but then further down another person talks about (i think) having an entire testing directory so your server in affect holds two sites... how do other people get around this problem? LAMP? An entire hidden test site on your server? Quote Link to comment Share on other sites More sharing options...
Stooney Posted June 24, 2011 Share Posted June 24, 2011 A local dev server. Copy the site to your PC and just work on it there. Once you feel it's solid, upload it to the live site with a backup on hand. Quote Link to comment Share on other sites More sharing options...
.josh Posted June 24, 2011 Share Posted June 24, 2011 Usually it is done by using a versioning system like svn. Basically you setup a central repository of your files and then check them out to two locations: live site location and dev site location. You can then do development/testing from the dev checkout and when you are happy, you commit your changes back to the repository, and then update your live files from the repository. Strictly speaking, you don't need a versioning system or repository to do this..you can just have a separate duped dev version of your site and then copy directly over to live site once you are happy. But the advantage of svn is that it keeps track of the changes you've done, and you can "rollback" to previous changes. It also allows for more than one person to work on stuff. But anyways, whether or not your dev version of your site is located on the same server or on a separate server or if you choose to have it locally on your own computer is up to you. It's mostly a question of resources more than anything - as in, can your server's diskspace, memory, etc.. handle having it on there. But most individual users and small sites usually just checkout the repo and do development on their own computer, using a LAMP or WAMP stack. Anyways...not sure what you're really asking here... you asked on SO and all of the people there more or less told you the same thing... Are you not understanding what they are saying? Need more details about how to implement a versioning system? Quote Link to comment Share on other sites More sharing options...
freelance84 Posted June 24, 2011 Author Share Posted June 24, 2011 Hi, Updating a live script is gonna be new ground for me pretty soon. The SO mentioned the different ways but the thread was also not current so just thought i would get peoples opinion (on here as I'm a member here) as to which method they prefer. It's mostly a question of resources more than anything - as in, can your server's diskspace, memory, etc.. handle having it on there. But most individual users and small sites usually just checkout the repo and do development on their own computer, using a LAMP or WAMP stack. I'm fairly confident that my server will be able to handle a test site. And as you mentioned this also allows multiple access to the test files. Hmm, any food for thought on this really and where to start. Think i'll start by researching "implement a versioning system" "svn". Does "dev site" basically mean a development site, a different domain on a different server? Quote Link to comment Share on other sites More sharing options...
.josh Posted June 24, 2011 Share Posted June 24, 2011 In this context, "dev site" is just a generic term meaning the "development" version of your live site. As mentioned previously, it doesn't really matter where you host the development version of your site - the main point is that it is a separate copy of your live site's files that you can play with. Whether you host that separate copy on the same server or different server or just make a local copy on your own computer doesn't matter. Quote Link to comment Share on other sites More sharing options...
freelance84 Posted June 24, 2011 Author Share Posted June 24, 2011 So basically there are no real pros or cons to testing new files online (either on your existing server or another) or offline (using LAMP or WAMP). Its just down to the preference of the individual, unless there is a team of developers (small or big) working from different locations in which case it is a 'no brainer' that the test site need to be online so accessible to all. Cheers, much appreciated. (gonna get my head into http://subversion.apache.org/ then. There's even an online pdf to download on it http://svnbook.red-bean.com/) Muuchos gratcias Quote Link to comment Share on other sites More sharing options...
Philip Posted June 24, 2011 Share Posted June 24, 2011 So basically there are no real pros or cons to testing new files online (either on your existing server or anothe) or offline (using LAMP or WAMP). Its just down to the preference of the individual, unless there is a team of developers (small or big) working from different locations in which case it is a 'no brainer' that the test site need to be online so accessible to all. IMO you should test the file offline before committing it, especially when working with multiple people. If you don't test your code before you upload and you find a mistake, you just have to upload yet again. Why bother with that extra (granted its a small amount, but it adds up over time) work when you could have just found it locally to begin with? Plus if you are working with multiple people - nothing is more frustrating to have your stuff not work because somebody else did not bother to check their work before committing it. As far as dev vs live server. Ideally the dev server should be setup in the same type of environment as the live server, just with extra error reporting. For larger sites, this should be a separate box so you are not to take down the live site by accident with new dev code pushed to the box. Linode has a great library of info for you to use, and even version control stuff to help you along Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.