You really need to have a deployment script.
Check out Capistrano . This will save you hours and hours of work. You can remotely migrate your production db with this.
The only database you should have in your production environment is the production database. Development and testing conditions should not be available.
What does your http mail server look like? Apache? Nginx? Any details will depend on how you set things up. I answered here about setting up my server.
source share