2

I am trying to create multi-site platform using codeigniter. Requirements are: - Same Codebase. - Same Database.

Just wanted to know how to achieve multi-site platform if we use same database/codebase? Is there any way we can create separate tables for each new site i.e wordpress multisite?

Thanks a lot.

Imran Ali
  • 372
  • 5
  • 16
  • I have a site in multi language with same DB but separate code. e.g www.example.com/arabic and www.example.com (english), are u talking about this? If yes then i can help – Faiqa Feb 24 '14 at 11:37
  • To separate data you can use various table prefix for various sites within the same database. – Robert Trzebiński Feb 24 '14 at 11:50

2 Answers2

0

For separate sites you have to create separate directories, and set paths accordingly

eg. 
      application/contollers/site1/index.php 
      application/contollers/site2/index.php

Same for views and models

For database you can use prefix,

eg: if u are creating same site in different languages 

    eng_title
    arabic_title
    eng_description
    arabic_description or arb_description

and you can fetch your desired data with your query and condition.

Albzi
  • 15,431
  • 6
  • 46
  • 63
Faiqa
  • 155
  • 11
0

CI tutorial would be helpful for your requirements, please check

Running Multiple Applications with one CodeIgniter Installation

Girish
  • 11,907
  • 3
  • 34
  • 51