I am trying to run multiple installations of wordpress on a single installation of WAMP. This is for testing purposes, I want them to be separate installs using separate databases (I'm not interested in hosting multiple sites through one wordpress install).

The problem I'm seeing is that when I log in to wp-admin for any site, it redirects to the wp-admin page for one of the sites. So I can only configure the one. The databases for the other installs never even get initialized. Any idea why this might happen?

I configure Apache to find the separate sites using VirtualHost. The below shows what those mappings look like, for a site on branch1.localhost and branch2.localhost: (branch1.localhost and branch2.localhost are mapped to 127.0.0.1):

<VirtualHost *:80>
    ServerName branch1.localhost
    DocumentRoot "C:\src\branch1\test.deployment\wordpress"
</VirtualHost>

<Directory "C:\src\branch1\test.deployment\wordpress">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


<VirtualHost *:80>
    ServerName branch2.localhost
    DocumentRoot "C:\src\branch2\test.deployment\wordpress"
</VirtualHost>

<Directory "C:\src\branch2\test.deployment\wordpress">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

The wp-config.php files for each branch then points to a separate database. Then I login to http://branch1.localhost/wp-admin.php, it works fine I can configure that site. However when I log in to http://branch2.localhost/wp-admin.php, it redirects me to http://branch1.localhost.php. It seems both sites are sharing the same database, because if I edit the post on one it shows for another.

I suspect this may not even be possible, given that the wordperfect configuration file assigns its settings to a global. Potentially the last config file overwrites every other configuraiton, I don't know php enough to be sure of this. The wp-config.php file contains stuff like:

 define('DB_NAME', 'branch1TestDatabase');
link|improve this question

80% accept rate
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.