When you say that you have “two different databases connected to the second one” What does that mean? I think I will help better if I understand what you did.
If I am correct, you will need a separate MySQL database for each blog you plan to install and a second WordPress install as well.
The wp-config.php file will vary for each installation. The lines to change are:
define(‘DB_NAME’, ‘wordpress’); // The name of the database
define(‘DB_USER’, ‘username’); // Your MySQL username
define(‘DB_PASSWORD’, ‘password’); // …and password
I wanted to make a local copy of an online blog. So I first exported the database and the WP content.
In Mamp I created a second database and imported the tables of the backupped database into that one. Then I did a new WP install in a new folder. When I started that up I entered the correct database name, user and password. After creating the new wp-config file and clicking continue it said I already had a wordpress installation.
I already did a wordpress install once for the first site. But as I created a second database and did a fresh WP install in a new folder, that shouldn’t matter?
Probably did something wrong but don’t know what. Basically it’s like moving a WP site to a new hosting provider.
I think you need to review Moving_WordPress.
He may need to set up an alias for his second install if he is wanting this second installation to be independent of the first one. That will need to be done by setting up an alias for that new folder in the httpd.conf file.
If one needs to run two or more different, independent installations of WordPress (rather than a “Multi-Site” install), one would need to create the other “virtual domains” through the use of the “alias” directive in the httpd.conf (Apache config file) for each instance.
For example:
your “DocumentRoot” may be set to something like:
/home/<user>/htdocs
Then, you have WordPress install 1 in a folder called: “WordPress_1”,
you would create an alias for it:
Alias /WordPress_1 “/home/<user>/htdocs/WordPress_1”
Then,
Alias /WordPress_2 “/home/<user>/htdocs/WordPress_2”
etc. . . .
Of course, each installation would have its own database and user pair.
Then,
To go to WordPress 1 -> http://localhost/WordPress_1
WordPress 2 -> http://localhost/WordPress_2
So, the answer would be with configuring the server system for more than one (virtual) domain, so that each installation can be treated separately in its own folder – on the same machine.
You could also do that with each having its own assigned localhost IP address too!