-1

I have a drupal website where on the existing one we need to create a subsite. More specifically, we need to access the subsite through the existing one. Both sites (main and subsite) as far as i can understand will use the same database but whatever changes regarding the configuration of the subsite, such as Themes, Blocks etc, will not affect the main site. In other words, we need two sites (a main and a subsite) that will share the same database, but each one will have its own configuration. Is it possible with Drupal and how?

Thanks in advance

  • I am not exactly sure what you mean by "share the same database" in this context. That could mean several things: share the users, share content, etc. Can you please clarify? – cilefen Jan 26 '16 at 14:51
0

Here's a guide on how to create a sub site within drupal. You can do it so the main site's theme/modules are used on the subsite or you can overwrite them.

https://www.drupal.org/documentation/install/multi-site

You can share the 1 database but have separate tables (this means spearate user,content and config) by adding a prefix when you first setup drupal under the advanced settings when entering the database name, username and password.

E.g. you could prefix the main site with "main_" so "main_node" and prefix the subsite tables with "sub_" and that would have tables like "sub_node"

Or alternatively you don't use the drupal multisite functionality mentioned above and you just put a whole new drupal install within the root of the main site.

e.g. /html/subsite

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.