Building Drupal Multisite on MWN Web Hosting


As web designer and developer I trust MWN to serve hosting for my client's websites. To install Drupal multisite on MWN that based on SPanel, below are the tutorial I have to you:

I. Using subdomain for Drupal multisite
1. Create your initial Drupal site at www.yourdomain.com.
2. Create a folder in the sites/ folder that matches the subdomain you want to create (so for site1.yourdomain.com, the folder name would be site1.yourdomain.com).
3. Duplicate the settings.php file from the default folder and place it in your newly created folder from step 2.
4. Edit the settings.php file you just placed in the site1.yourdomain.com folder so that it does not point to a database. You can replace the line that has your other site's database information with this:
$db_url='mysql://username:password@localhost/databasename';
The alternative to setting up a separate database for each multisite installation is to assign all sites to the same database as the primary domain, but with their own table prefixes. So for example, for the users table you would have:
Multisite database:
database1.site1.users database2.site2.users database3.site3.users
Single database:
database1.site1_users database1.site2_users database1.site3_users
5. In SPanel (www.yourdomain.com/spanel/spanel.cgi), setup the subdomain from Subdomain Manager menu then click add subdomain. For the above example of site1.yourdomain.com, fill "site1" (without the quotation mark) in the column right before your primary domain. And CHOOSE Alias then click Add.
6. Go to your subdomain address and type in your browser: site1.yourdomain.com/install.php. Drupal will ask for your database information and then install the table necessary to run the new site.
7. You are all set to use a new Drupal multisite in your subdomain.


II. Using domain parking for Drupal multisite
1. Create your initial Drupal site at www.yourdomain.com.
2. Create a folder in the sites/ folder that matches the parked domain you want to create (so for www.yourdomain2.com, the folder name would be yourdomain2.com).
3. Duplicate the settings.php file from the default folder and place it in your newly created folder from step 2.
4. Edit the settings.php file you just placed in the yourdomain2.com folder so that it does not point to a database. You can replace the line that has your other site's database information with this:
$db_url='mysql://username:password@localhost/databasename';
The alternative to setting up a separate database for each multisite installation is to assign all sites to the same database as the primary domain, but with their own table prefixes. So for example, for the users table you would have:
Multisite database:
database1.site1.users database2.site2.users database3.site3.users
Single database:
database1.site1_users database1.site2_users database1.site3_users
5. From your primary domain SPanel (www.yourdomain.com/spanel/spanel.cgi), go to Domain & DNS Manager menu then click Add Addon Domain. Fill your parked domain (www.yourdomain2.com) on Domain's field and choose "addon" for Template zone DNS option then click Submit Query.
6. Setting up the symlinks by point your SSH client at your primary domain and login (I used PuTTY in SSH mode on my Window XP or you can use your own terminal on *NIX machines).
7. At the command line prompt, type each line then hit Enter:

cd /u/your_username/sites
rm -Rf ./yourdomain2.com
ln -s . yourdomain2.com
The symlinks "yourdomain2.com" now points to your document root.
8. Go to your parked domain address and type in your browser
www.yourdomain2.com/install.php. Drupal will ask for your database information and then install the table necessary to run the new site.
9. You are all set to use a new Drupal multisite in your parked domain.
OdayPele "Life runs unpredictable". With my educational background I bet you won't believe of being who I am now. Though I knew life is not as simply as unreal world in cyber life but it has led me to enter my professionalism in carrier, bussiness and creation which support to my whole of life.

7 comments for "Building Drupal Multisite on MWN Web Hosting"

  1. wah sudah berhasil ya..

    ReplyDelete
  2. Huehehehe, akhirnya mas dengan susah payah. Soalnya di MWN pake Spanel bukan CPanel, jadi bingung juga nyari tutorialnya. Ntar2 ajarin lagi ya??

    ReplyDelete
  3. pengen belajar drupal yang terkenal itu....

    ReplyDelete
  4. Kalo saya sih pengennya jadi terkenal, bukan pengen belajar, hahahahaha

    Salam kenal ya Mas Hilman, thanks for visiting!

    ReplyDelete
  5. mmm, tambah bingung.
    bantuin dong, aku mo setting siteku http://berugak.com sebagai portal di domian utamanya, dan blog di sub domiannya.

    Bisa gak ya?

    ReplyDelete
  6. Kalo mau setting multisite sebagai subdomain pakai langkah I di atas.

    Pertama, setting Drupal di domain utama, berugak.com dan pastikan situs utama berjalan dengan baik.

    Kedua, buat folder subdomain anda di folder utama Drupal /sites. misal buat folder: blog.berugak.com.

    Ketiga, ikuti langkah seperti tutorial I di atas (poin 3-4).

    Keempat, setting subdomain sebagai multisite bisa lewat SPanel dengan memilih ALIAS subdomain di MWN, bisa via CPanel/ WHM, Symlink (yang paling popular), maupun Virtual Hosts. Semua tergantung kepada hosting anda mengijinkan yang mana ;)

    ReplyDelete
  7. Hi Friend,
    Congratulations for this nice looking blog.In this post everything about Web Design Accessibility have meaningful information that would be better for others who are interested in web Design.

    ReplyDelete

Post a Comment

Iklan Bawah Artikel