can anyone explain me about the production

Hi, I am working in developement site when I created my site,Now I want to put this on live so that it can be accessible…As I know that we should change the evironment type to production if we are going to live our site.,my question for this are my codes will be overwritten or disappear ? please enlighten my mind.

Thank you in advance.

Yes, configs and other files from environments/prod will be copied over your current ones.

so meaning I will be going to start coding again because the files are overwritten my controllers,models,etc…?

Thank you in advance.

No. Check what’s inside https://github.com/yiisoft/yii2/tree/master/apps/advanced/environments/prod

Okay thank you. :0

I am now putting it to my server,and I execut the init command ,it ask me to overwrite or not.

please see the screenshot.

Do I need to overwrite or not ?

It depends on what do you want to do. init just copies from environments to the application.