Multiple sites in the same directory but separate database

微笑、不失礼 提交于 2019-12-02 06:26:19

问题


In my Linux based shared hosting account with HostGator, it is soon going to be dozen of sites. There is files count limitation for CPanel backups in my account.

To reduce the total number of files I need suggestion from you all so that I continue to add new bunch of sites using Drupal-6.

I don't want to share the same database just to keep my maintenance simple. I know Drupal allows multiple sites in the same DB. But I want to avoid it.

Can I reuse the same Drupal files in my old site and use them to create symbolic link from my new site? Except for root/sites directory because it may contain temporary files or files used/uploaded specific to each site.

So if my Drupal 6 site site1.com is there then I can reuse its files for my new site site2.com by creating symbolic links in site2.com pointing to sit1.com except for sites directory:

site2.com/includes->site1.com/includes

site2.com/modules-> site1.com/modules

site2.com/sites ( not shared)

site2.com/misc -> site1.com/misc

....

I've gone through related thread: Combining databases in Drupal but I don't want to go as per suggestions in it.

Any suggestions about this idea?


回答1:


What you want is Drupal's multisite feature. This is intended to work separate database and uploaded files but with shared code across the sites. Basically you point the document root for each virtualhost at the same Drupal installation and Drupal takes care of loading the correct database.

Details here: http://drupal.org/getting-started/6/install/multi-site




回答2:


I have faced the same issue, I used this tutorial for drupal 6, Hope you'll benefit from it.

Tutorial: Click Here



来源:https://stackoverflow.com/questions/6771608/multiple-sites-in-the-same-directory-but-separate-database

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!