How do you setup a subdomain?


  • | 65 points

    how do you setup a subdomain in laragon
    eg: i already have testside.org and want to make the subdomain dev.testside.org

    tia


  • | 1179 points

    @isitmeor
    I did it once in WampServer; i belive its no different to creating a main domain (project) . Never tried this in Laragon but i think the steps would be the same.

    You say you've already set up testside.org, so :
    Create a new project called, dev.testside.org, use Quick App, this entry goes into your hosts file automatically since you dont have to write to the virtual host file manually. A sub-domain is just an entity of an existing domain name.

    As i said i haven't tried this before in Laragon but try it and i think you'll be good to go


  • | 65 points

    @trepatk

    unfortunately this does nor work


  • | 1179 points

    Just tested it myself without problem. Whats happening when you try it? are you getting errors? Are you using the extension setup in the 'Settings' menu > [hostname].{extension} - have you setup .org as your tld extension? I can create sub domain after sub domain with almost any extension the way shown


  • | 65 points

    dis you test it with a wordpress installation ?


  • | 1179 points

    @isitmeor
    Thats because its not a real sub domain when used on localhost. Your fooling the system via the use of the same main domain but Windows simply sees each entry in hosts as a separate domain. The problem with this method with Wordpress is the site url. If your installing WP on the subdomain youll need to manually check that the full url is being used throughout WP database - you could do a search and replace to ensure the Url proliferates throughout! Alternatively if you need sub-domain functionality then you could make it directory-based and simply install WP in a sub-directory which is better documented and way easier.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.