How do you setup a subdomain?
-
how do you setup a subdomain in laragon
eg: i already have testside.org and want to make the subdomain dev.testside.orgtia
-
@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
-
unfortunately this does nor work
-
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
-
dis you test it with a wordpress installation ?
-
@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.