Best way to deploy your code from local to production?

Title is very self explanatory, but how do you guys deploy your code from your local machine to the production server? I use a VPS myself using a standard Cpanel setup.

I am using Deployer - and have written a blog post about using it: http://jacmoe.dk/blo...i-with-deployer

Jacmoe, does it deploy your mysql database as well?

It does migrations.

That is the only way of mysql deployment that I would recommend.

we can use jenkins - Contious deployment process by writting ANT script with required instructions.

I use FTP (e.g FileZilla) to deploy my Yii 1 application to production. Can anyone tell me if FileZilla is a good way to deploy in Yii 1? And Yii 2?

No it is not a good way… you should consider using a version control and then pull the production branch

Thank you for your answer. But I’m completely alone in the project. In this case, do I need to use version control too?

Yes you should. I work alone on many projects too and i use git or svn for all of them.