After explaining, how to use Different database connections in WordPress development environments, I’m going to show, how to set up Magento development environments with different database connections. Magento works a little different here, since it has its database connection in an XML file rather than a configuration .php-file.
Since I am using version control with GIT, I have set up different environments for my current WordPress/Magento-married project. For this project, I did not want to continue “cowboy coding”, so I set up a remote staging / testing / development site and multiple local development sites. Each site has its own purpose and needs its own MySQL database. So I had to handle different database connections in my WordPress installations. Well, I could work with only one DB,
Recently, I moved this website to A2 Hosting. Since I am using git at the office intensely for developing the company’s website, i felt like I’d have to continue using git for my home-story blog, too.
When I was a little more new to git, I chose Bitbucket as the service to host my repo. There I can have unlimited private repos with up to four more users and “sync”