Configure Yii2?


In different videos you can see how Yii installed on the local server. I used to do differently- any CMS I put immediately in the required domain and go to edit, code, configure. I feel so comfortable.

Do I need to configure Yii on the LAN or you can also directly on the domain I used?
March 19th 20 at 08:45
2 answers
March 19th 20 at 08:47
You can download full version framework to download with FTP. But this is not recommended, and it does not make sense. First you have to configure / change the structure of the framework for themselves on the local server (this is important). For convenience, the framework is installed using the package Manager Composer.

If your OS is Windows, I recommend you to install OSPanel as a local web server.
What should I change/configure in LAN and why I can't do this directly on the hosting? - nathen commented on March 19th 20 at 08:50
For example, in /common/config/main-local.php set up email and database. They are clearly different from that on the remote server. By the way, that's the problem with FTP: when you save them on the local server, they will change and the remote.

To avoid this, it is necessary to work through version control, and /common/config/main-local.php to ignore put, separately adjusting it to local and remote servers. - colt_Schiller98 commented on March 19th 20 at 08:53
I can't do this directly on the hosting?

Can if your code editor / IDE supports FTP.
Tip: all of the products, the company JetBrains support FTP - helmer61 commented on March 19th 20 at 08:56
@helmer61, got it, thanks, I'll try your option. Ashamed to admit it, but I out of habit still use an editor DreamWeaver CS3. Bought on the top crust disk pirate, and enjoy it - never refused on any OS, but he's already 12 years old.

And yet, I edited the code so make the edit, then press upload to the server. Don't ask why I have not automated this process, I don't know. Probably out of laziness. - nathen commented on March 19th 20 at 08:59
March 19th 20 at 08:49
CMS then CMS, after installation on the hosting, you almost all changes can make a panel.
YII is not a CMS, is a framework.
All, but not all. I work often via FTP. As I understand it, since Yii will always have to work through FTP. Then what is the point salivate first on the LAN, and then transfer? I can immediately to do it in combat mode. - nathen commented on March 19th 20 at 08:52
Very bad way to work with "combat" sideboard via FTP. In the case of serious users can jamb quite a long time to watch something like HTTP 500.

In the best practices to develop locally and with the remote to communicate via GIT or some version control. - colt_Schiller98 commented on March 19th 20 at 08:55
@colt_Schiller98, you are right, but was too lazy)) all my Projects and lightly, so any damage was not critical. If something went out of control for more than 1 minute, I rolls it all back and do differently. And work. But GIT is not familiar, perhaps it's time to find out what it is. - nathen commented on March 19th 20 at 08:58
Necessary. This is a very handy thing. You can roll back at least a year ago if worse comes to worse. - colt_Schiller98 commented on March 19th 20 at 09:01

Find more questions by tags Yii