Drupal multisite installation (Same code base, different database, cpanel)

I am going to use my spare domain to demonstrate how can we setup a multisite using same drupal code base but different database. So, lets start  by installing drupal. 

Now once the main site is installed, let's create a subdomain where we will install another site. Since i have cpanel, i will create the subdomain using cpanel as shown in the picture below.

One very important thing to note in this stage is that the document root of the created subdomain should point to the domain where we installed our main site. In my case it is ishwor.net.np so the demo.ishwor.net.np should point to ishwor.net.np. Please refer to this link if you are confused.

Also create a new database for the site to be installed in the subdomain.

After this has been done, lets open up a FTP client and log into the main site domain and go to 'sites' directory and create a directory in the pattern 'yoursubdomain.yourdomain'. In my case it is going to be demo.ishwor.net.np. (Note: you can use file manager also to do this).

now copy the 'default.settings.php' from 'sites/default' directory and paste into the 'demo.ishwor.net.np' directory and rename it as 'settings.php'

Now open a browser and go to 'subdomain.domain' (demo.ishwor.net.np), you should get installation page for the site to be installed in subdomain as in the picture below.

Install the subdomain site using the new database info(the one you created for the subdomain).




The end result