M
M
Maxim Timofeev2016-04-12 10:57:22
Yii
Maxim Timofeev, 2016-04-12 10:57:22

How to implement project cloning in yii?

Let's say there is a web application mysite.com on yii2 advanced, a certain partner appears and we want to create a clone for it on a subdomain. In this case, the logic is identical, but some tables in the database are only for this subdomain. Maybe the theme is different. The authorization is the same. What is the best way to organize this. Can this process be automated?
Share your experience and patterns.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kim, 2016-04-14
@webinar

For each site, create your own folder in the folder with the framework:
site1.com
site2.com
...
Build the site on a modular system. Store all modules in common, store main settings in common/config/main.php (main components, except for databases for example), also store in common all assets (except for sites responsible for themes), widgets, behaviors, traits, interfaces . As a result, you can get such a structure that only config folders with minimal settings will remain in the site[\d+].com folders - the site name, paths, databases, etc., assets and views () the last two will be responsible for the site interface ).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question