5 minute multisite using Cpanel
You want petermoulding.biz, cjm.net.au, and unlevelhome.com on the same server, or virtual private server, using one copy of Drupal and a separate database for each site. You are using Cpanel. The first site will take whatever time you need to upload and install Drupal. The second and subsequent sites will take 5 minutes each. This example uses Drupal 6. Drupal 7 appears to be the same.
First site
I assume you have the first site set up. You used WHM to create a database account for petermoulding.biz then went into Cpanel for petermoulding.biz to set up email and install Drupal. You now have petermoulding.biz working with Drupal 6.
When you created petermoulding.biz, you created a user for the account and I will assume the user is named pb. Use the MySQL Databases option or the wizard. I use the MySQL Databases option. You create a database named drupal and cpanel shows a database named pb_drupal. You create a user named drupal for the database and Cpanel displays user pb_drupal. You then connect user pb_drupal to database pb_drupal with all privileges.
You use the Cpanel Email Accounts page to create some email accounts for petermoulding.biz including one named boss. You will use boss (at) petermoulding.biz as the email address when you create the administration account during the Drupal installation.
When installing Drupal, you create directories /sites/default/ and /sites/default/files/ plus file /sites/default/settings.php. You set the permissions to 777 then run the installation step then set /sites/default/settings.php back to 644. You will repeat this step once for each new site.
Second site
Go into Cpanel on petermoulding.biz and park domain cjm.net.au on petermoulding.biz. While you are there, park unlevelhome.com on petermoulding.biz. If you run into a limit on the number of parked domains, you can go back into WHM to increase the limit. You want a database per domain so while in WHM, increase the limit on the number of databases.
Create a database and database user for cjm.net.au, perhaps user pb_cjm connected to database pb_cjm. Repeate for unlevelhome.com with user pb_unlevel connected to database pb_unlevel.
Go into Email Accounts and create boss (at) cjm.net.au plus boss (at) unlevelhome.com.
You probably used FTP to upload Drupal 6 to petermoulding.biz. I will assume FTP. There is a file manger in Cpanel that does similar things to Filezilla and other FTP programs. Go into /sites/ and create directory cjm.net.au. While in /sites/, create directory unlevelhome.com.
Create directories /sites/cjm.net.au/files/ and /sites/unlevelhome.com/files/ with permission 777.
Copy /sites/default/default.settings.php to /sites/cjm.net.au/ and rename the file to settings.php then give it permission 777. Copy /sites/default/default.settings.php to /sites/unlevelhome.com/ and rename the file to settings.php then give it permission 777.
Do you notice how you are repeating part of the original installation? Yeah, it gets boring if you have 2000 sites.
Visit http://cjm.net.au/ and up pops the Drupal 6 installation process, exactly the same as happened with petermoulding.biz. Answer the same questions. Use the right database name, database user name, and password.
Visit http://unlevelhome.com/ and up pops the Drupal 6 installation process, exactly the same as for petermoulding.biz and cjm.net.au.
Third site
Done! You could do ten at a time if you can keep track of all the passwords. Replace your Drupal Beginner t-shirt with the Drupal Do It In My Sleep t-shirt.
Themes
Put standard themes in /sites/all/themes/ to let every site use the themes. Site specific custom themes go in a /themes/ directory within the site. A cjm theme would go in /sites/cjm.net.au/themes/ as /sites/cjm.net.au/themes/cjm/.
Modules
You have a separate database for every site so you can activate different modules for each site. Put the modules in /sites/all/modules/ then let each site switch them on or off.
Update notifications
Drupal automatically checks for code updates unless you turn off update notifications. You have only one copy of the code so switch off update notifications for all sites after the first.
Ok, darumaki pointed out the case where different sites use different modules. This might be fine if every site was using the same modules, however, a typical multi-site setup usually involves each site using different modules, therefore, it should not be advised to turn off updates on the other sites, because updates only checks the modules that are enabled and not all the modules in the module directory.
You could turn on every single module in your base domain, to get update notifications, or you could turn on updates in just those domains with something different.
The same consideration applies to themes because theme updates are detected and notified the same as module updates. The main saving from turning off updates is when you set up 3550 identical sites for the 3550 members of a professional association. They want separate databases for client privacy but they all get the same modules and features as specified by their association.
Maintenance
You have one copy of the code so put all the sites offline before updating the code. You have a database for every site so run update.php on every site before switching the sites back online.
Which site goes first?
The first site is locked in place while any other sites are parked on top. Use a throwaway site for the first site. When I registered petermoulding.com, I registered the .biz and some other variations for experiments. I used the .biz domain name as the base site for the multisite setup because the .biz domain name will not be visited by anyone but me. Each time I load a new theme into /sites/all/themes/, I can activate it in petermoulding.biz for testing. When one of the added on sites becomes to busy for the server, I can move the added on site without disturbing the other sites.
The first site is also the default site your customers will see when there is a setup failure in Drupal or Apache. Put contact information on the first site so people can report failed Web sites.
Cpanel interface
Cpanel provides several themes and each theme shows different combinations of buttons. I use crimson_smoke for these screen shots.
Domains
Go to the domains section to park your new domain, unlevelhome.com, to your existing domain, petermoulding.biz. Do not use Subdomain or Addon domain for this part of the setup.

Subdomains
You add subdomains in the form x.example.com. For domain unlevelhome.com, you might add forums.unlevelhome.com and shop.unlevelhome.com. First you would park unlevelhome.com on petermoulding.biz and create unlevelhome.com in Drupal following the instructions on this page then you would look at adding forums and shop to unlevelhome.com. Adding subdomains should be covered in another page because there would be considerations around sharing user ids across the domains.
The following image shows the Cpanel subdomain page. You can add, edit, and delete subdomains. If you leave the document root field empty, the result will be similar to parking a domain and should let you use multisite. Multisiting forums.unlevelhome.com next to unlevelhome.com would require public_html/sites/forums.unlevelhome.com/settings.php, another database, and a way to share the login.

Addon domains
Addon domains are similar to parked domains but add more complications. Do not use Addon domains for the procedure in this page, use Parked domains.
The following image shows the Cpanel domain addon page. Notice the password field. Addon domains have a subaccount type arrangement you might use if you want to delegate administration to someone else. You could put several domains in one WHM account using separate subdirectories and give each site administrator separate FTP access. The separate FTP access does not work with multisite because they all share the same directories. Instead use Parked domains and control uploading of files using a Drupal module.
If you insist on using Addon domains instead of Parked domains then set Docuement root to public_html/. Drupal multisite is based on all page requests from all sites going to the same public_html/index.php.

Parked domains
You can park domain egjhnbhniu.com on example.com and Drupal can separate the two if they have separate multisite settings. You use Parked domains without redirection. A request for egjhnbhniu.com/food/turnip goes to public_html/index.php then Drupal looks for public_html/sites/egjhnbhniu.com/settings.php and uses the database from the settings file. If public_html/sites/egjhnbhniu.com/settings.php is missing, Drupal uses public_html/sites/defaults/settings.php and you see a page from example.com.
The following image shows the simple Cpanel domain parking page. It is simple because their are no passwords or document root settings. This is all you need for multisite.

Redirects
A redirect sends one domain to somewhere on another domain. egjhnbhniu.com could be redirected to example.com/test-sites/egjhnbhniu/. A common use is for personal Web sites. You create example.com/~george then, for your birthday, grandma buys george.com for you. You can redirect george.com to example.com/~george. When visitors visit george.com, they see example.com/~george so do not redirect, add george.com as a subdomain with a document root of ~george.

Drupal in a subdirectory
When you install Drupal in /home/example/public_html/, unlevelhome.com is in /home/example/public_html/sites/unlevelhome.com/ and you access Drupal as http://unlevelhome.com/. If you install Drupal in a subdirectory, for example /home/example/public_html/drupal-6.13/, you can access Drupal as http://unlevelhome.com/drupal-6.13/.
An alternative is to change the way you park the domain. Put /drupal-6.13 the Domain Root setting. Set Domain Root to /public_html/drupal-6.13 and access Drupal as http://unlevelhome.com/.
Drupal lookup documentation
There are lots of questions about the Drupal lookup sequence to get from a domain name to a settings.php file. The Drupal documentation is in INSTALL.txt under the heading MULTISITE CONFIGURATION. The following list is the lookup sequence from Drupal 6.12 INSTALL.txt for www.sub.example.com/site3. Note that Drupal will not look in sites/sub/settings.php or sites/site3/settings.php.
sites/www.sub.example.com.site3/settings.php
sites/sub.example.com.site3/settings.php
sites/example.com.site3/settings.php
sites/www.sub.example.com/settings.php
sites/sub.example.com/settings.php
sites/example.com/settings.php
sites/default/settings.php
| Attachment | Size |
|---|---|
| cpanel-domains.png | 14.89 KB |
| cpanel-subdomains.png | 12.98 KB |
| cpanel-addon-domains.png | 16.95 KB |
| cpanel-parked-domains.png | 14.3 KB |
| cpanel-redirects.png | 17.45 KB |

Having A Problem with this
I've followed your instructions exactly... and the first site works just fine, but when I type in the second sites parked domain - in my case http://nlightphoto.com - it sends me to the first site - in my case http://www.nlightonline.com - and not to the drupal install so i can set up the second site. Any idea?
realmac.macdock.com
http://nlightphoto.com current displays the single line
petermoulding.com/web_architect
me too
Exact same thing here, too. I can't get 2nd sites+ to see their specific folder's config. The theory is pretty simple:
1. Create a master drupal installation
2. Point Site2+ to the master installation via cPanel
3. Create site-specific configuration in master drupal installation
4. copy modules and themes to shared master configuration
however, it all should be working. i have it set up correctly. except it just forwards to the master drupal installation and doesn't recognize the multisites.
If there were a checkbox, "enable multisite" that would explain everything but there is not. :)
Do you have:
Your base site:
/sites/default/settings.php
Your second site:
/sites/unlevelhome.com/settings.php
If you have only ever parked your domain then the Apache and DNS configurations should be ok. If you have done anything else with the second domain in Cpanel or WHM, addon or subdomain or separate account, the DNS entry might be screwed up by Cpanel. On rare occasions I have had to delete a DNS entry using WHM but that was only when moving a domain from a full account to part of a multisite.
There are pages explaining how Drupal decides which settings file to use. Drupal drops bits off the front and back of the domain until it matches a directory. I used to have a page bookmarked but it moved. Apache uses a simpler idea. If Apache finds anything wrong with a site definition or a site request, Apache uses the first site definition. You may be able to view your Apache conf file in WHM. There is nothing in Cpanel to show you the file because the Apache file applies across all the sites in the VPS, not just the sites in the Cpanel account.
petermoulding.com/web_architect
AAAH HAAAAA
AH HA!
So, that was it. Your illustration of the files /sites/domainname.com/settings.php explained it! I had it so it went sites/domainname.com/sites/default/settings.php.
Holy crap, Peter, I think I am going to get this one going. Do you know what this means for me? it means I get to scale.
THANK YOU X 1000
As a business developer (like yourself), this is probably my POST OF THE YEAR for 2009. You've just allowed me to scale and for that I thank you. It was the missing piece for me. Other documentation didn't quite cover the step-by-step like you do.
I have one question: You said "Go into Cpanel on petermoulding.biz and park domain cjm.net.au on petermoulding.biz"
This page has quite a few radio-button options. Could you elaborate a bit on how to properly set the cPanel Parked Domains page? This seems really important. Thanks so much. Your posting changed my life.
-garry
"Making Your Internet Vision A Reality" - Internet Business Consulting by Garry Egan
Which radio buttons?
Hello Garry,
I added screenshots from Cpanel with the theme I use. There are no radio buttons when parking. Redirect has radio buttons. A different Cpanel theme might have different options. Can you provide more details? Which theme do you use in Cpanel?
petermoulding.com/web_architect
I only see one area of your
I only see one area of your instructions that may need to be rewritten :)
This might be fine if every site was using the same modules, however, a typical multi-site setup usually involves each site using different modules, therefore, it should not be advised to turn off updates on the other sites, because updates only checks the modules that are enabled and not all the modules in the module directory.
Know what I mean ?
Is it possible with different cpanel accounts?
Hi,
Nice and useful post, thanks a lot!
I wonder if it is possible (or not) to do this (or a closest) multisite install, but without share the same cpanel.
In other words, if you follow your instructions, with parked or addon domains, you get a multisite drupal installation (great!), but if you want give all the owners of the domains a Cpanel account, you can NOT do it, because is the same Cpanel account (you can access it throw the diferent domains, but once inside Cpanel, you can manage all of them).
I'd like to have a multisite Drupal, sharing the code, but not DDBB nor contents, but I'd like to have different and separated Cpanel accounts. Is it possible?
Regards and thanks again
Files from other accounts not visible.
FTP to one of your accounts. Go up to /home/. You cannot see the directories for the other accounts.
In one VPS I was able to see the databases for the other accounts. The security depends on how the ISP sets everything up.
Something I have not tried is to use the reseller option in WHM. You can set up accounts so the accounts can resell. I do not know what you can do when reselling off an account.
ISPs tell me that Plesk gives you more control and lets you set up subaccounts with very fine access controls. Plesk might do what you want. The one time I tried to use Plesk, I could not set up anything useful, not even a basic Cpanel style configuration, and went back to Cpanel.
Hi Peter, I have a multi-site
Hi Peter,
I have a multi-site setup at my private test server (localhost) . Now I need to set up all the 3 sites together at the production server.
To do this:
1) I copied all whole of Drupal folder Setup to server with the 3 sites.
2) Created 3 db for each of the sites.
3) Changed the settings.php for each . Changed the "$db_url = 'mysql://root@localhost/test';" string as required.
4) However on going to the url see a message saying that the site is off-line.
Do you think my approach is flawed?
What do you think I probably might be doing wrong. Also, cud this be because of the clean urls . I forgot to turn them off before transferring the files to the server. Or do you think there is some other reason as to why this happened. I have checked the changes made in the settings.php twice. Dont think I have made some error there. Any help would be appreciated.
Thanks
Bhambry
What is the path to settings.php?
When on your local machine, what is the path to settings.php? The full bit from the start?
When on your server, what is the path to settings.php? The full bit from the start?
Are you using Cpanel on your server?
Were you using Cpanel on your local machine?
petermoulding.com/web_architect
Hi Peterx, Thanks fr such a
Hi Peterx,
Thanks fr such a prompt reply. The answers to wat u have asked:
Path on Local Machine:
C:\xampp\htdocs\drupal-6.9\sites\default ... fr the default site
C:\xampp\htdocs\drupal-6.9\sites\a .. for site a
C:\xampp\htdocs\drupal-6.9\sites\b... for site b
Path for each of the above on the server are:
/public_html/sites/default
/public_html/sites/a
/public_html/sites/b
Also,
On the Server: yes I am using Cpanel. I uploaded the files on the server using a FTP program.
On the Local Machine: No I did not use any cpanel to setup Drupal on my local machine.
Additional Info:
>> the url of the site is : http://saurabh.x10hosting.com/
>> Since I am new to hosting ; so I am experimenting with a free hosting service which is www.x10hosting.com
Thanks once again.. reading this through.
Bhambry
css and theme thumbnail not showing up
I installed the second domain. It works great with stock themes.
When I use an installed theme (say in sites/all/themes/whatever or sites/example.com/themes/whatever the css for the theme is not loaded. My page is a jumbled mess without the css. Another example is my Admin menu has no css. Final example, if i go to the theme page to assign a new theme (admin/build/themes) all of the stock themes have screen shots but any that i have added just show text. Somehow the screenshot is being looked for in the wrong location. /sites/all/themes/whatever/screenshot.png.
My original install using default/settings.php recognizes any theme in the sites/all/themes/whatever and works great. Any thought on what im missing here
chad
www.learndrupalfast.com - drupal video tutorials
for people that like to watch video instead of reading a book.
answer
I found out that ?g was being added to all of my .css in the header. so it looked like /sites/all/themes/ability/style.css?g. After reading some more, I refreshed my cache and every thing worked.
chad
www.learndrupalfast.com - drupal video tutorials
for people that like to watch video instead of reading a book.
Very Grateful!
Thanks a lot! I've attempted this multisite config a year ago and I gave up! This tutorial is really easy to follow and worked first time like a charm!
I have one question... what about the security/speed/optimisation concerns?
I was watching this video about Multisites on Drupal and he was recommending doing a few tweaks in httpd.conf to speed up and further secure his multisite installation. Can we do this here too or does this "parked domain" method take care of it?
Cheers mate!
marcopolo ---
Blog Marco | Best Designed Drupal Websites
Choosing the wrong modules is a bigger concern
Some of the points mentioned will make little difference. Your biggest slowdown will be choosing a module that hits the database a million times to produce a cloud or some similar decorative effect. Start your optimization by looking through your add on modules and visit the forums to see discussions on the impact of each module and the alternative approaches.
The next slowdown will be lack of memory. Upgrade or look for modules and themes that use less memory.
Check your cache settings in Drupal to save processing and memory for anonymous visitors.
The idea of moving .htaccess files around is just an idea. Apache has to look in every directory from your Web root down to your current directory to check if there is a .htaccess file. You would really have to understand a lot about Apache to make it work, definitely not a task. Your biggest gain in that area is from completely turning off .htaccess. To do that, you have to do stuff that is not normally in the skill range of someone using Cpanel. I would not put it in a 5 minute Cpanel page, more likely it would be a separate .
Among other problems would be the thousand posts on this page asking why a site suddenly disappeared. Create a separate page. Security changes should also be on a separate page because support would be so specialized.
petermoulding.com/web_architect
THANK YOU
This works like a charm!
Didn't work for me
Hi Peter, thank's for the tutorial.
I have this problem:
I have me second domain park in the first
I end completely the Durpal Installation
I made the /sites/secondDomain folder and add the settings.default.php and rename it to settings.php
Then
I tried entering to the link www.mysite.co.cr/drupal-6.13/sites/secondDomain but NOTHING happened. got few days trying this
multisite installation, any help will be great.
Thank's in advance.
You set up example.co.cr and
You set up example.co.cr and it uses sites/default/. When you add seconddomain.co.cr, you create sites/seconddomain/settings.php, go to http://seconddomain.co.cr then Drupal looks for sites/seconddomain/settings.php, finds the settings.php is not set, and launches the install code.
petermoulding.com/web_architect
Thank's
Thank's for your fast reply.
here is the think.
I didn't install Drupal in my public_html , instead I put it in a sub folder named drupal-6.13.
I have an cPanel account, and an actual site running so I didn't want to put it down while I'm doing tests.
the structure is:
- First installation on mysite/drupal-6.13
- Second Domain parket
- I create the folder dor the second domain in mysite/drupal-6.13/sites/secondDomain
- and copy the settings in mysite/drupal-6.13/sites/secondDomain/settings.php
So when I try to hit http://secondDomain.co.cr the result is my default site main page.
Do I have to make a symlink? I tried but it didn't work because I don't have a console to make it. also tried whit a .php but never either.
Thnk's for you time, and your patient.
GOT IT!!! THANK'S AGAIN
Thank's for your advise Peter, looking at my question again, I found the answer.
Because I didn't make the Drupal Installation on the root of my site (public_html) I have to execute my site adding the subfolder,
I mean www.secondDomain/drupal-6.13 and there it goes, continue smoothly.
Thank you very much for all the help.
Drupal in a subdirectory
Good thinking. I added Drupal in a subdirectory based on your question and answer.
petermoulding.com/web_architect
I currently have 3 separate
I currently have 3 separate sites running on one server and would like to consolidate. Each site has it's own unique registered domain, and none of them are the base site found in /public_html. They also, obviously, have their own databases and what not. Can I still use these directions (after backing up respective databases) to make this work?
Yes. Consolidation notes
DNS entry: If you have sites on different IP addresses, the DNS entries are cached for up to a day. Change the DNS entries to have a time to live of 5 minutes. When you do move the sites, you an change the DNS entries to the new IP address and the changes will occur everywhere in 5 minutes. After the site is changed, change the DNS time to live back to the default because a 5 minute time to live creates a big overhead.
Databases: Practice backup and restore or export and import. Multisite lets you use separate databases or have one database with the sites separated by table prefixes. The main thing is to practice the restore/import because a lot of people backup without testing the restore step. If you have all three sites using the same database name then you will have to restore each database with a different name.
Default site: Think about which site will be the default site. if anything goes wrong with a domain name or DNS entry or anything else, visitors will arrive at the default site. The default site is usually the one that advertises your web development services or has a contact page that can be used to report problems with accessing the other sites.
petermoulding.com/web_architect
Thanks so much, but...
I did everytihng you said and worked perfectly, right now im uploading the modules (i have 11 sites so it was really helpful) the only thing is that for my parked domains i can not access them using www
Do not redirect your subdomain
I tried this but was redirecting my subdomain to the main drupal install, which would not work. I changed the document root of my subdomain to the main drupal install and it worked slick as deer guts on a doorknob.
multisite install fails: Cannot redeclare system_requirements()
My Drupal Do It In My Sleep t-shirt is at the cleaners, so I'm have trouble getting a second parked domain to come up under multisite.
I have a drupal install that serves a base domain and one parked domain, they are both working fine, and I'm trying to add another domain.
Here's how I went about attempting to setup the new domain:
I parked a domain, call it: myparkeddomain.com
I created a directory: public_html/sites/myparkeddomain.com
I created a directory: public_html/sites/myparkeddomain.com/files
I copied default.settings.php to the new directory and renamed it settings.php
I set rights to 777 on the directories and settings.php
I created a database
I assigned a user to the database with all rights.
I then pointed my browser to http://myparkeddomain.com,
It resolves to http://www.myparkeddomain.com/install.php (I assume that means the rewrite rules are ok?)
and displays install's "Choose Installation File" page (a hopeful sign)
with radio button choices for Acquia and Drupal. (the base domain is an Acquia install)
Is the screen I should expect at this point?
When I select Drupal, I get install's Choose Language screen.
When I select English, I get this:
Fatal error: Cannot redeclare system_requirements() (previously declared in /home5/seguinst/public_html/modules/system/system.install:12) in /home5/seguinst/public_html/modules/aggregator/block/blog/blogapi/book/color/images/comment/contact/dblog/filter/forum/help/locale/menu/node/openid/path/php/ping/poll/profile/search/statistics/syslog/system/system.install on line 299
This is on Bluehost, so we have a .htaccess in the document root, (called public_html).
For reference, the rewrite rules in the .htaccess are
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Any clues on resolving this?
settings.php should be in
settings.php should be in public_html/sites/myparkeddomain.com. Did you put it in public_html/sites/myparkeddomain.com/files?
Also read http://drupal.org/node/588062
petermoulding.com/web_architect
Cannot redeclare system_requirements()
Yes, settings.php is in the right directory, i.e. public_html/sites/myparkeddomain.com (not files). Thanks for for the crosscheck anyway.
I think your reference to http://drupal.org/node/588062 is the right direction. I don't see the answer yet, but the clues are there.
The error message list all of the drupal core module directories, starting with "aggregator", listing them all in order, down to "system", then listing a file in that folder: system.install, then giving me a line number that is the end of the declaration for system_requirements(), which was, of course, what the error message started out with. Very clear, really, if one could only understand it.
I have done an audit of my modules, and I can't find another "system" folder, not in this install. I do have another drupal6 install on this host,
The document root for the multisite drupal6 install is /public_html/
(so our problem child is /public_html/modules/system/system.install)
and there is another install at /public_html/standaloneinstall, where standaloneinstall is the documentroot for another domain.
(so there is another there: /public_html/standaloneinstall/modules/system/system.install )
But my multisite install shouldn't "care" about the standalone install.
I feel that the answer is staring me in the face, but I don't see it yet...
problem with old .install files?
I posted the same question as above: "multisite install fails: Cannot redeclare system_requirements()" as a trouble ticket to Bluehost support, and this was the prompt reply:
"First of all, folders should always be 755, not 777. And, files should be 644 by default unless they are .cgi, .pl, .so or .sh (755 for those). I fixed permissions and then rename /home5/seguinst/public_html/modules/aggregator/block/blog/blogapi/book/color/images/comment/contact/dblog/filter/forum/help/locale/menu/node/openid/path/php/ping/poll/profile/search/statistics/syslog/system/system.install to system.install-old. Your installation is now coming up fine without any errors. Basically, it was trying to go through a system requirements and system installation check for this particular module when by default, that is already done."
-Bluehost Support
Although that fix (setting /system/system.install to system.install.old) got me to the database screen of the install (progress!), I got a similar error on a different module (filter.install), and then on taking that one out, another on a different module, so I went through all the modules and took out the .install files (renamed to .install.old) and now I'm back in the game!
Now all I need to to understand what's going on. From this I assume that the .install is created as part of the install process? Is it not required to exist, or must not exist or what? Why is it that I'm seeing these problems? I'm sure I'll have learned something interesting to understand this.
-m
.install
The .install files are your module installation scripts that drupal runs automatically when installing a module. When you create a module named beer, you create beer.install containing function beer_install() and optionally beer_uninstall() and perhaps beer_requirements(). beer_requirements can check that you have already installed modules hops, yeast, water, etc. beer_install() creates tables. beer_uninstall() deletes the tables. When you disable a module, select the uninstall tab next to the list tab on the modules page. There might be an option to uninstall the module and that will delete all the data created by the module.
777 lets the public upload files to a directory. During installation Drupal wants 777 on sites/example.com/settings.php and sites/example.com/files/.
When you create multisite, you create a separate database per site, one for each settings.php file. The .install files run once on each database because they create the tables for that site. When you create example.com, the install files access the example_com database and create all the tables for example.com.
That Cannot redeclare system_requirements() sounds weird and you mentioned Acquia. Acquia and some other prepackaged Drupals use install profiles to load the Drupal modules plus a selection of other modules. They are adding a whole extra layer of software over the normal Drupal install. They may have special requirements related to multisite. I do not use any of the packages so cannot answer questions related to them. I see references to freaky errors related to install profiles. I suggest you google and
After installation you can copy a system module into a site modules directory then modify the module to test new code. If you copy the module before the installation, Drupal becomes confused and produces weird errors. You may also get weird errors if you install the same module in sites/all/modules and sites/example.com/modules. Drupal gives you the flexibility to do these things and cannot handle every possible combination. If Drupal did try to handle all the possibilities, Drupal would spend 2 minutes checking files before every page load.
petermoulding.com/web_architect
Addon domain questions
Hello, thanks for this tutorial. It gave me hope that I could actually do this! However, upon following the instructions, I'm not getting the Install Drupal form, just the "Index of / cgi-bin/" type page.
Here's what I did:
I just want to have a main site (site-a.com) and 2 other sites (secondsite.com and number3.com) which are independent (hence the addon domains), yet under the same umbrella. Thanks for any assistance,
Jim
Parked domains with shared document root
We'll you can see from above I'm having my problems, so take my advice with a measure of caution...
As I understand it, the document root is the same for all of the sites which share the same code base (multi-site).
For example, if the document root is public_html, and you base domain is mybasedomain.com, then, when you can park the domain to mybasedomain.com, with the same document root. Consider that and re-read the rather excellent little tutorial.
-m
public_html/index.php
Thank you Jim and -m for the comments. I added some extra text based on your comments. All page requests for all sites go to public_html/index.php then Drupal is activated then Drupal sorts everything out. That is why you park instead of Addon for multisite. If you use an addon domain with a subdirectory of /public_html/example, the Web server looks for /public_html/example/index.php instead of /public_html/index.php.
petermoulding.com/web_architect
Blank Install Page
Hi Peter,
I'm wondering if you can help.
I have an existing site http://www.greyveil.com - works fine
I want to have a second site at http://cmb.greyveil.com
I have followed your example of using a subdomain to point to my /public_html/ installed
I have the secondary site in the correct sites/cmb.greyveil.com folder structure with a fresh settings.php file
When I visit http://cmb.greyveil.com it resolves to http://cmb.greyveil.com/install.php?profile=default
but I get a completely blank page.
Could it be an .htaccess problem, or something else, any suggestions?
Thanks Mat Gritt
WSOD
The White Screen of Death makes a nice change from the Windows Blue Screen of Death and the Linux/Unix Black Screen of Command Line Death but is still annoying. Often it is a PHP error occurring before there is output to the screen. Things you can do:
If a search of drupal.org fails to give you a hint, google drupal install.php?profile=default blank screen.
Change your PHP options to output all errors including startup errors.
Increase the PHP timeout.
Go through your base site deleting all add on modules until the install works then start adding the modules back in.
I visited http://cmb.greyveil.com/ and received:
500 - Internal Server Error
This is a temporary server error.
Please try to reload the webpage later.
If you are the webmaster of this site please log in to Cpanel and check the Error Logs. You will find the exact reason for this error there.
Common reasons for this error are:
* Incorrect file/directory permissions: Above 755. In order files to be processed by the webserver, their permissions have to be equal or below 755. You can update file permissions with a FTP client or through cPanel's File Manager.
* Incorrect Apache directives inside .htaccess file. Make sure you have not specified unsupported directives inside the local .htaccess file. Such include PHP settings and Apache module settings.
petermoulding.com/web_architect
Wow fast reply!
I was playing around with the configuration when you visited - Sorry didn't think you'd be online (i'm in New Zealand)
if you visit it now, what do you get....
A quick question how would I Change your PHP options to output all errors including startup errors.
And thanks for the suggestions, I'll try them later - off to a client meeting!
multi-site questions
I have seven sites that are very inter-related, but are currently using separate URL for each site.
apple1.com
orange1.com
pear1.com
pear2.com
pear3.com
etc.
etc.
I was thinking to do a multi-site. I have several concerns and would appreciate any thoughts on this.
* I know I want to maintain separate databases for each site for security, backups, and administration. I don't personally admin all the sites.
* The updating of the sites is definitely improved with the update feature, except I have to individually update each site now.
--------Is it possible to use the same drupal modules and themes across all the sites, with separate themes on each site?
*Several of these sites is very busy traffic, and I was thinking multi-site application with one drupal modules application package for all sites may not be a best way to do it.
-------These sites are basically open (no logins or membership required). Membership is available of course.
-------I don't know if a single login across all the sites would be a must have. It would be nice of course. I'm thinking to allow OpenID and some of the other ID services.
-------This way the login would probably be a settled easily.
* Administration is not complex, now it is a bit more difficult when I have to update for Drupal core on all the sites.
* All these sites are relevant to each other, in other words there is a lot of crossover between them.
* The SEO is a concern as well. I realize page titles are page titles. I'm just thinking of whether there are benefits or negatives to a multi-site SEO.
I'm asking these questions, because I just can't go out on a limb with production sites. I also have to have a pretty convincing explanation for doing a multi-site.
Not being lazy, just thought I'd investigate this further. I realized couple years back that I would probably come to this point at some time in the future.
I haven't mentioned things like cron along with other things that might have their own issues. Don't know enough at this point to ask all the right questions.
all or mango
If you want my attention, use mangos and blueberres instead of boring old apples. :-)
site/all/modules/example makes the example module available to all sites.
site/mango.com/modules/example makes the example module available to mango.com.
site/all/themes/example makes the example theme available to all sites.
site/mango.com/themes/example makes the example theme available to mango.com.
Do not put the module in two places. If more than one site uses a module or theme, put it in all then switch it on in just the sites that use it.
Sites that benefit from sharing users can use Domain Access to share the user table. If you want separate databases, use multisite and openid or alternatives. With multisite you can at any time move a busy site from multisite to a dedicated server except the base site, the default site, which would need a replacement. Splitting a busy site out from Domain Access is more painful.
petermoulding.com/web_architect