I have a Drupal 6 site - example.com.

Can I use sub.example.com for a separate installation of Drupal 7?

Comments

pixelsweatshop’s picture

Yes. Just point it to a different db.

nevets’s picture

Yes

philipbe’s picture

Is there documentation to help me figure out how to set this up?

pixelsweatshop’s picture

Add a sub domain through your normal method and drop drupal core in the directory. Create a new db and point the new install at it. Install drupal as normal. There is nothing special here. Setting it up is exactly the same.

philipbe’s picture

Thanks for the help.

I still feel like I'm missing something. I setup a subdomain through cPanel - subdomain.example.com with a document root of public_html/subdomain. Created a new database, user, and email addresses and installed a new codebase at public_html/subdomain.

However, when I went to install the new instance of Drupal, it shows up at example.com/subdomain instead of subdomain.example.com. Is this expected behavior because it is a different codebase?

john_b’s picture

All this is right but I will jump in here because anyone who is not a cPanel user may not be aware just how difficult cPanel makes it (and it also tends to overwrite manual settings of virtual hosts made from command line).

Leaving aside the question of using Drupal multi-site or Domain Access or Subdomain module, and assuming you want a separate codebase and database for the subdomain:

cPanel does this in a clunky way. Setting up a subdomain does not really work. There are several tutorials out there mainly aimed at setting up Drupal multi-site but the main point is the same, which is that you use cPanels 'parked domain' feature. e.g. http://www.chrisherberte.com/blog/cpanel-and-drupal-multi-site-subdomains. With other control panels (or none) setting up subdomains is easier, this is something which cPanel makes confusing.

Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors