0

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 1

4

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:

  • vendor folder 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.
Sign up to request clarification or add additional context in comments.

2 Comments

It means if I have a change for all sites then I should update into aaa, bbb, ccc, ddd, and eee?
The names can be whatever you want. Remember to set aliases for new apps like in here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.