Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

Multisite Functionality

2»

Comments

  • Awesome. The direct instructions just make things so much easier versus deciphering forum threads. So all sites would live inside of the same VHOST folder but have individual databases, configs and few other files such as ACL and navigation.

  • edited April 2013

    That page is great! Thanks.

    WRT each site having its own database, there's an excellent discussion of the various ways of setting up the database architecture for a multi-tenant site in an msdn post and an excellent presentation (the code is Ruby but the issues are the same) detailing some of the issues and how he solved them using Postgres.

    It struck me, looking at that video that the way the database table #prefix# is used in Elefant, you could fairly easily use a single (or sharded) database and give each site its own set of tables rather than its own database, with the #prefix# tracking the ELEFANT_ENV. This would also allow us to designate some tables as global if we selectively removed the #prefix# or used a separate #global_prefix# for them. Of course the data issues are probably different for saasy sites and multisites. Just a thought

  • I guess you could keep the database info the same across sites (or omit them from the site-specific configs and let them inherit the db info from the main conf/config.php), and just set site-specific prefixes instead. In that case, each config would have:

    [Database]
    
    prefix = "site1_"
    

    That may be preferable in certain cases, since the sites could even share data between them too. On the other hand, separate databases can more easily scale up... Pretty neat that you could just as easily do it either way though, I hadn't thought of that.

    PS. Thanks for sharing those links! Multi-tenant architecture choices are important to get right for the type of application being built, but I don't think I've seen it broken down so well before.

  • I actually prefer the idea of individual databases. One thing I despise about WP Multisite is the all one database. I now it can be split up using plugins but those are mostly advanced hacks. So with that being said do you create individual databases? Just a thought maybe this could be baked into the elefant shell script. So you could run something like ./elefant addsite domain.com and that would automatically create the files for you. Just name each corresponding file domain.com.file so domain.com.site.db, domain.com.conf.db and so forth.

  • That could make a good app!

  • Glad you like the idea.

Sign In or Register to comment.