Multiple sites on 1 DB

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
sanjay
Forum Members
Forum Members
Posts: 19
Joined: Fri Oct 15, 2004 7:28 am

Multiple sites on 1 DB

Post by sanjay »

Hi, I'm new to this CMS, but have to say it's great for small sites that do not require user submissions.

I think it's possible to have multiple sites on 1 database, could someone point me to the instructions on how to do this?

Has anyone shared the DB with another CMS, like phpws or Mambo?

Thanks
Sanjay
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Multiple sites on 1 DB

Post by Ted »

Sure, you can share multiple sites easily on DB easily. When you install CMS, change the database prefix on page 2 of the install from "cms_" to anything else (say "othersite_"). This will make all of the tables from the new install all have that prefix in front of their names, and should not conflict with anything else that is in there.
spiriralph
Forum Members
Forum Members
Posts: 36
Joined: Sat Jun 27, 2009 10:52 am

Re: Multiple sites on 1 DB

Post by spiriralph »

But how can share one Database (tables) for 2 or more web sites (hosts) creat alians web site not use iframe ????
alby

Re: Multiple sites on 1 DB

Post by alby »

spiriralph wrote: But how can share one Database (tables) for 2 or more web sites (hosts) creat alians web site not use iframe ????
In step 5 of install you can select a different prefix for tables (default is cms_) then you have another site installation with own DB tables

Alby
spiriralph
Forum Members
Forum Members
Posts: 36
Joined: Sat Jun 27, 2009 10:52 am

Re: Multiple sites on 1 DB

Post by spiriralph »

ONE Db for many web site alliance!
not copy of tables in mySql for sub domains or sub dir!
equal content for  _http://ZZZ.COM & _http://YYY.com & _http://TTT.com & so on ....
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Multiple sites on 1 DB

Post by Nullig »

If you want them to have the same base data, then just use the same db and tables - you can edit the config.php file to point to the same db.

You could work this very well, using a menu structure like:

1 - Site 1
  1.1 - Site 1 Home
  1.2 - Site 1 Products
    1.2.1 - Site 1 Widgets
    1.2.2 - Site 1 Things
2 - Site 2
  2.1 - Site 2 Home
  2.2 - Site 2 Services
    2.2.1 - Site 2 Tech
    2.2.2 - Site 2 Office
3 - Site 3
  3.1 - Site 3 Home
  3.2 - Site 3 Rentals
    3.2.1 - Site 3 Homes
    3.2.2 - Site 3 Condos

Each site would have it's own menu and you could use different templates/stylesheets to make them look different. It would be an interesting experiment to try.

NOTE: if they're on different hosting servers, you will have to change the:

$config['db_hostname'] = 'localhost';

to the proper remote hostname for the db.

VERY IMPORTANT!!!! The sites must all use the same CMSMS core file and module versions, as this is maintained in the db. If any site uses any additional modules, or different versions of modules, it will probably bugger the others.

Nullig
Last edited by Nullig on Tue Jun 30, 2009 2:40 pm, edited 1 time in total.
Pierre M.

Re: Multiple sites on 1 DB

Post by Pierre M. »

spiriralph wrote: equal content for  _http://ZZZ.COM & _http://YYY.com & _http://TTT.com & so on ....
This duplicate content scheme is best achieved at the webserver level (virtualhosting). It is not CMSms specific.

Pierre M.
Locked

Return to “[locked] Installation, Setup and Upgrade”