I’ve been working on a fun setup with Vagrant and WordPress (and Puppet) and trying to get it working. It semi-works now but not 100% where I want it.

What I am going for is a WP site that is managed via GIT and through that automatically uses a different MySQL database based on the GIT branch that is checked out. Master would have a DB, 3.5-branch has it’s own DB. All of this is driven by the checked out branch in the .git/HEAD file. Since it dynamically pulls the DB name you can easily have a **single** WP codebase with all the themes/plugins shared and to go from testing WP 3.5.2 vs trunk you simply checkout a different branch in git.

I’ve got that part working with 2 or 3 extra wp-config.php lines which can easily be stored in GIT since Puppet creates and sets the MySQL user passwords but haven’t been completely happy with the flow if someone just cloned the WP Vagrant repo and being able to move around in different branches.

Any thoughts on this type of setup vs having multiple WP installs all in one directory? Trying to keep things super simple but at the same time very flexible/extendable.