Is it possible with Yii2, I can run multiple websites using single core code and one server? Suppose I have 5+ websites , each website has own database, theme is same for all, only single server on backend, but I'm not sure how I can achieve this goal.
1 Answer
This is possible - in fact Advanced Template Project is built like this.
Each website is single app so instead of having frontend, backend and common you can have something like aaa, bbb, ccc, ddd, eee being the names of the websites. Each app can get its own configuration.
There are obvious limits to this implementation:
vendorfolder is the same for every app so every app gets the same packages in the same versions no matter if required or not,- server must be able to handle more requests at the same time.
2 Comments
Muhammad Shahzad
It means if I have a change for all sites then I should update into
aaa, bbb, ccc, ddd, and eee?