Use one WordPress database with multiple instances of one site

Is there a way to use the same database, tables and all, with two different domains? For example, two employees each have thier own subdomain to develop / test with, so there may be two instances of a site:

jack.example.com/test_blog/
jill.example.com/test_blog/

however, since the base url is stored in the database, it seems that it would require two distinct databases for this set up to work properly. Is there any way around this?

4 Answers
4

Turns out that instead of relying on the Database for a URL, you can set it in the config file, which solves the problem I was having, like so:

define('WP_SITEURL','http://jack.example.com/test_blog/');

and then I set use a different config file for the other instance.

soruce: http://codex.wordpress.org/Editing_wp-config.php#WordPress_address_.28URL.29

Leave a Comment