Question

Wanting to run multiple sites with subdomains

  • Posted on January 26, 2013
  • gorracAsked by gorrac

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.


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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);