Wanting to run multiple sites with subdomains

Posted January 26, 2013 7.7k views
We have our Wordpress site running fine, but (as per the tutorial) its installed in /var/www/ say i wanted to have another site on the same server with a subdomain, how would get that set-up? this is mainly for future referance, in case it might be important to change something now should that time come.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
4 answers
You would add a subdomain in to your DNS through our Domains manager and then create another virtual host entry in your Apache config or nginx config (server name) and then provide it with a separate document root.
Option 2, enable multisite function (according wordpress official docs - :

Apache - In the httpd.conf file, or in the include file containing the VirtualHost section for your web account, add a line like this:

ServerAlias *

Also create a wildcard DNS record like:

* A

Important note: You will need to add this line of code to your wp-config.php to enable multisite function :

define('WP_ALLOW_MULTISITE', true);
i see, thanks for the help, so i don't need to modify anything with my file structure?

With previous hosting i'm used to bending to all these rules, the amount of freedom here is amazing :D
It's really up to you and just depends on how you want to do it.

It's your own server where you manage the configs so it's whatever you find the most comfortable. =]