Every website (e.g. Stack Overflow, Server Fault) of the Stack Exchange network has the same code base (cf. Does StackExchange 2.0 Share the Same CodeBase with SO?), but also has unique features like a custom theme and data (e.g. questions, users).

How do you manage this?

Is it a single instance that responds to multiple domains (multi-tenant)?

Or do you have multiple instances with different configurations?

If so, how do you tell the code base which instance should be run? Environment variables? Symlinks to custom code?

Same question for the database: do you have separate databases or one large database?

marked as duplicate by Matt, Martijn Pieters, Bart, michaelb958, Hugo Dozois Feb 18 '14 at 22:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    meta.stackexchange.com/q/199141/163863 will answer some/most/all of your questions. They have a separate database for each site; which is hidden in the answer by Marc; I therefore think this is a duplicate. – Matt Feb 18 '14 at 19:10
  • Thanks Matt! It answers my questions, and I'm surprised because I thought it was multi-instance. I couldn't find it because I didn't know the term "multi-tenant" (now I've updated the question with this term). – collimarco Feb 18 '14 at 19:42

Browse other questions tagged .