How you build a test site while your other site is still running

Discussion in 'HTML & Website Design' started by fadetoblack22, Nov 5, 2008.

  1. #1
    I am building a new site and I want to keep my old site running while it is being build. I was going to put it in a folder called /new

    However I am unsure about how to move it once it is done. I was going to use relative urls, but I have had problems with this before with images in the stylesheet.

    Can anyone suggest what is the best way to do this?

    thanks.
     
    fadetoblack22, Nov 5, 2008 IP
  2. creative4w3

    creative4w3 Active Member

    Messages:
    105
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #2
    The standard is to use SVN for developers and server(s). Once the work is done on the developer's sides, push it to the live branch and update from that branch on the server. All done and efficient as ever.

    It sounds sort of complex but it should take even the slowest learner 2 days at max if they go to SVN's official site and read how to do it. Basically it takes 2 clicks and one command on linux. If you aren't using SVN for creating websites then you really need to learn now, as it's once of the most crucial things to know (I think).
     
    creative4w3, Nov 5, 2008 IP
  3. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,399
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    160
    #3
    What's their site? I get lots of results in google from svn.

    2 days to learn is quite a long time. I can update all the links myself in a few hours.
     
    fadetoblack22, Nov 5, 2008 IP
  4. rene7705

    rene7705 Peon

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I make a PHP variable that I export to Javascript, called SITE_ROOT_URL.
    Then all my images use that PHP variable plus a sub-url within the site-software itself.
    For instance (in in-line html of a .php file:) <?=SITE_ROOT_URL?>art/component/titlebar.png
     
    rene7705, Nov 8, 2008 IP
  5. iboltmedia

    iboltmedia Peon

    Messages:
    194
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I would just to what you orginally planned and put it in a folder called new with all relative URLs. Then create an images folder inside their and act like /new is your root folder. Then when you are ready, just copy everything from that folder into your root directory.
     
    iboltmedia, Nov 8, 2008 IP
  6. fadetoblack22

    fadetoblack22 Well-Known Member

    Messages:
    2,399
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    160
    #6
    The problem with that is that my menu is done using php includes. It has to use absolute urls because subfolders inside the new folder will not point to the correct pages otherwise.
     
    fadetoblack22, Nov 8, 2008 IP
  7. Jaynesh

    Jaynesh Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can install easyPHP on your pc. You can then test your new website locally.
     
    Jaynesh, Nov 8, 2008 IP