johnsmith153 Posted February 12, 2009 Share Posted February 12, 2009 I am developing a 20 page social network site - my first full site after various bits of training / part bits of sites. How should I set-up/design the site so going forward I can test it / update / improve. Especially for testing new ideas & updates to pages before making them live. How would Facebook for example do it? They obvisouly launch updates to pages. How is their process done. They dont just update live and hope for the best - it is obviously tested first. My idea: create site at www.sitename.com and also have duplicate at test.sitename.com - all testing can be done at test.sitename.com (which is protected by .htaccess password) - before quickly moving it all to www.sitename.com where it is live (swopping over as need) - (obviosuly code needs to support both www. and subdomain, to ensure don't need two pages for both) (but must support https: which can be funny on subdomains) Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/ Share on other sites More sharing options...
drisate Posted February 12, 2009 Share Posted February 12, 2009 Nah you just need to create a local environement and test it on your PC like if it was a server. You need a PHP/Apache emulator with MySQL. I personly use UsbWebserver v7.0. It's a complete protable webserver Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760112 Share on other sites More sharing options...
corbin Posted February 12, 2009 Share Posted February 12, 2009 If you have a high traffic site and you do develop locally (which is what I would do), I would upload all of the files first, and then merge them all at once. My upload speed is horribly slow, so if I uploaded them 1 at a time, some users might see weird things while I was in the process of uploading files. Just a thought. Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760149 Share on other sites More sharing options...
drisate Posted February 12, 2009 Share Posted February 12, 2009 indeed thats why i use UsbWebserver v7.0 I rarly get my stuff working on the first try hehe Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760150 Share on other sites More sharing options...
premiso Posted February 12, 2009 Share Posted February 12, 2009 Another option is, let them know of downtime at like midnight, then "turn off" the site while you upload the files and do a test for the production site. This way users do not get weird errors, it is expected, and you can upload/test your site first. Always keep a backup of the old site just in case something went horribly wrong and you have to revert and do more testing locally. But yes, developing locally is the way to go. If you have many people developing I would look into Subversion. Great software. Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760152 Share on other sites More sharing options...
Daniel0 Posted February 12, 2009 Share Posted February 12, 2009 My upload speed is horribly slow, so if I uploaded them 1 at a time, some users might see weird things while I was in the process of uploading files. Use version control (svn, git, mercurial, etc.) and do a checkout on the production server. The server that hosts the repository and your production server should both have high speed connections. When you've committed the changes you would just update the working copy on the production server. Always keep a backup of the old site just in case something went horribly wrong and you have to revert and do more testing locally. That's where version control comes in. Anyway, I think setting up a staging server is a good idea. This should of course use the exact same configuration as your production server does. You could write unit tests and functional tests and then have a continuous integration server on the staging server that runs all your automated tests. If it fails then it's back to work, if it doesn't fail then you can update the production server's working copy. I still think you should develop locally though. It saves you from uploading every single change and if your connection dies then you can keep on working. but must support https: which can be funny on subdomains Why? Just get a certificate per (sub)domain or get a wildcard certificate. Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760341 Share on other sites More sharing options...
corbin Posted February 12, 2009 Share Posted February 12, 2009 Most of the sites I manage are on shared hosting. I could probably still figure out someway to check out an SVN repo (could probably even do it with PHP lol), but not worth the effort. Quote Link to comment https://forums.phpfreaks.com/topic/144852-quick-simple-question-how-do-i-test-pages/#findComment-760400 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.