I'm building a theme demo site and everytime I add a demo and a new version of wordpress to a different directory I have to recreate all post. is there a way I can make them all share the same database of posts? Can I just change each install to call the same database in the config.php file or can I copy the DB and add it to every install of wordpress?
Yeah, you should be able to run 2 WP's on the same DB with not many problems. Just setup a master, and a slave. Slave WP install should just use the same DB info as the master's.
If your sites are hosted on different servers, then you need to set your MySQL database up to accept connections from external hosts. You can do this in cPanel with the MySQL Remote Access feature. I usually set my wildcards to %.
its on the same site. I installed another version of wp in a subfolder and I want that subfolder to use the same db as the main site