After these years I hope this will still answer your question...
I think I've got the situation working you want.
Allthough I don't have the Wordpress installation in '/subfolder/', but I've a installation 'in subdirectory' per language, and on the same level:
my-domain.com/nl/ -> this is primary installation, site id = 1
my-domain.com/en/ -> this is the first site created by multistie, site id = 2
my-domain.com/de/ -> this is the second site created by multistie, site id = 3
It requires a bit 'hacking' in the database, but it's very easy.
Make sure your multisite 'root' installation is working as intended in it's subdirectory. In my case I got the following in 'wp-config.php':
define('SUBDOMAIN_INSTALL', false); // allow sub-directory install (true for subdomain install)
(well in reality I don't have '/subfolder' :) )
Now create you're first new site through multisite in a subfolder.
When entering the foldername 'site2', Wordpress tells you it will be created as:
That's correct, we will remove the 'wp-multisite-root' folder manually t
Open up phpMyAdmin/directAdmin
In the table
wp_blogs edit the entry of you're newly created site.
We will have to modify the
path of it.
It can be done with the following query:
UPDATE `wp_blogs` SET `path` = '/site2/' WHERE `wp_blogs`.`path` = '/wp-multisite-root/site2/';
Change domain name and site name accordingly.
Also look for the site id mentioned there. If its the first extra site created it will be ID 2 as in my intro.
Look into the table
In our case with Site ID 2, it will be
There we will have to change the
option_value where the
option_name is 'siteurl' and 'home'. It can be done by running following queries:
UPDATE `wp_2_options` SET `option_value` = 'my-domain.com/subfolder/site2/' WHERE `option_name` = 'siteurl';
UPDATE `wp_2_options` SET `option_value` = 'my-domain.com/subfolder/site2/' WHERE `option_name` = 'home';
Again, change the domain and folder name accordingly.
You'll note that we remove 'wp-multisite-root' from the url there, so site2 will be on the same level as `wp-multisite-root'.
Refresh wp-admin and your site(s) will be listed as you wanted.