Question

Wanting to run multiple sites with subdomains

  • Posted January 26, 2013

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

It’s really up to you and just depends on how you want to do it. <br> <br>It’s your own server where you manage the configs so it’s whatever you find the most comfortable. =]

i see, thanks for the help, so i don’t need to modify anything with my file structure? <br> <br>With previous hosting i’m used to bending to all these rules, the amount of freedom here is amazing :D

Option 2, enable multisite function (according wordpress official docs -http://codex.wordpress.org/Configuring_Wildcard_Subdomains) : <br> <br>Apache - In the httpd.conf file, or in the include file containing the VirtualHost section for your web account, add a line like this: <br> <br>ServerAlias .example.com <br> <br>Also create a wildcard DNS record like: <br> <br>.mysite.com A 111.111.111.111 <br> <br>Important note: You will need to add this line of code to your wp-config.php to enable multisite function : <br> <br>define(‘WP_ALLOW_MULTISITE’, true);

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.