I have configured a multisite in order to use different subfolder for every site. I have started installing plugins on the network and while the installation works on the main site (https://mywebsite.com/stage/site1 ), nothing happens on the other site (https://mywebsite.com/stage/site2). It happen with theme installation too. It seems the installation are completely independent even if multisite is activated and the correct domain is defined.
What can be the reason of this behavior?
The following code has been used for wp-config.php
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
define( 'DOMAIN_CURRENT_SITE', 'mywebsite.com' );
define( 'PATH_CURRENT_SITE', '/stage/site1/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
while this has been used for .htaccess
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /stage/site1/
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
The website structure is:
https://mywebsite.com/stage/site1 (main website)
https://mywebsite.com/stage/site2 (secondary website)
Hope someone can help me to figure it out.
Thank you in advance!
wp-config.php
/ABC
and all sites are relative to that URL, your main site does not have to be your root site, it could just as easily be a site at/stage
that redirects to a second or third. This is also assuming you've added the above in the correct location like any otherwp-config.php
adjustment. What I'm seeing though means that/stage/site2
can never work, especially with that HTAccess that explicitly references/stage/site1
./stage/site1/site2
might work with how you have set it up though/stage/site2
already contains a copy of WordPress in that folder then that needs to be resolved first. You can't just overwrite it by adding a blog to a multisite in another folder and giving it that URL. This all sounds very messy, you should clean things up first. Why doesstage/site1
need to be the root site? It sounds like you have requirements that are incompatible with each other