Dev Site Vs Test Site Vs Live Site

Discussion in 'PHP' started by oo7ml, Feb 14, 2013.

  1. #1
    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...
     
    oo7ml, Feb 14, 2013 IP
  2. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #2
    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...
     
    GMF, Feb 14, 2013 IP
  3. muffet

    muffet Active Member

    Messages:
    720
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    68
    #2
    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. ;)
     
    muffet, Feb 14, 2013 IP
  4. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    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.
     
    oo7ml, Feb 14, 2013 IP
  5. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    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.
     
    jestep, Feb 14, 2013 IP
  6. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #5
    Thanks, can you elaborate as to what you mean by "restrict access to only yourself"
     
    oo7ml, Feb 14, 2013 IP
  7. GMF

    GMF Well-Known Member

    Messages:
    855
    Likes Received:
    113
    Best Answers:
    19
    Trophy Points:
    145
    #6
    For example: Only allow your IP to access the subdomain via .htaccess
    http://www.javascriptkit.com/howto/htaccess5.shtml
    Code (markup):
     
    GMF, Feb 14, 2013 IP
  8. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #7
    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).
     
    Rukbat, Feb 16, 2013 IP
  9. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #8
    My worry is that both would then have different server environments... and what might work locally, might not work on the live server
     
    oo7ml, Feb 17, 2013 IP
  10. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #9
    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.
     
    ThePHPMaster, Feb 17, 2013 IP
  11. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #10

    Try to minimize dependencies as much as possible and try to keep reasonably similar dev and production environments.
     
    jestep, Feb 18, 2013 IP