Hi, i am close to launching a site i have been working hard on for the past while. The site is developed in PHP. I have been developing the site on a VPS with one hosting company (A) and now i have moved the live site to a new better hosting company (B) (i won't go into why they are better) Ok, so i was thinking of running with the following set up: - development environment on VPS with hosting company A - test environment with new hosting company B - live site with new hosting company B This means i have to pay 2 hosting companies quite a lot of money per month, which is not a huge problem if needed... but do you think i would be ok running with just hosting company B and running the live site beside one testing and development site... Thanks in advance for any advice you can offer on this subject, it is much appreciated...
What I would do: Cancel hosting company A Migrate everything to B Try to mimic their hosting to a local machine and develop on that If everything is running fine, upload it. Or you could just create a subdomain on B (with passwort protection and IP filtering) and test there...
Set up a subdomain on the server with Company B to continue with development and testing of your live site if you're not completely satisfied with hosting Company A. Another alternative is you could install your live site on your MAC, Windows or Linux machine using either XAMPP or Wamp Server then develop and test then push it to your server with Company B and test and config and test again. Why continue paying for two separate servers if you're not completely happy with the service Company A is providing you? Make it easy on yourself.
Thanks, my only worry is that setting up SVN or GIT means i have to weaken the file permissions on the actual main server. If i want GIT to be able to write into the webfolder then the access rights must allow that.
The subdomain method works well if you don't want to go with a version control system. Develop and test on the same subdomain, but restrict access to only yourself. When ready to go live, copy the entire directory and change the configuration in httpd.conf to point to the new directory. Alternately you can symlink the root directory to the new version. Either of these methods allows you to instantly maintain full rollback versions in case something goes amiss even after testing.
For example: Only allow your IP to access the subdomain via .htaccess http://www.javascriptkit.com/howto/htaccess5.shtml Code (markup):
Don't connect the live site to the repository - use the development site (which should be local on your computer). Once the version you're working on is good, upload it to the live site (from your local computer).
My worry is that both would then have different server environments... and what might work locally, might not work on the live server
To make things easier, just have the three environment on the same server and access them via: dev.site.com staging.site.com site.com -> production This way you won't have to worry about different server settings. However, I would strongly advise on using subversion or GIT, it will make your life much easier when doing updates.
Try to minimize dependencies as much as possible and try to keep reasonably similar dev and production environments.