Correct way to set up development and production environments for Craft?
I'd recommend you take a look at the excellent existing threads on this:


Git Workflow and Multi Environment - how to approach
What's the best practice for handling data migration and organization across development environments?


as well as the official documentation on Multi-Environment Configs