Deployement to migration : which files to copy ?

I’m working on a project on my local machine and would like to deploy it on a production server.

The process to do so is not clear for me. Do I have to copy every files from my source(I,m using the advanced theme) or just some of them are enough ? ( for exmaple can I skip the folowing files in the root: yii.bat, init.bat, composer.json, init)

Also once in production if I change the mode from dev to production and put the good database dsn, do I have to do other modifications. Escpecialy do i have to run init again in composer and chose production mode ?


init just copies files from environments directory to application. Nothing more. Its production mode is a set of configs that turn off debug etc.

It’s better to copy everything w/o leaving out files if you’re unsure.