I have 2 wordpress-sites. Wordpress is installed under /var/www/html with the first created site and reachable under "server-ip". Then I decided for a network to realize a mobile version of the site with a different theme. Now the second site is reachable under "server-ip/mobile-site/". However it doesn't matter how I log in: „server-ip/wp-admin/“ or „server-ip/mobile-seite/wp-admin/“ or „…/wp-login.php“ I almost every time end up in the dashboard of the site under "server-ip". Using two different themes for the sites does not work either, it always takes the chosen theme for both sites.
Did I messed up my wordpress-installation with creating a multisite? Can I fix this without destroying any site-content and how can I do that?
Or could it be possibly the .htaccess-file? What is the issue?
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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|json).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
Thanks for the help in advance.
I have 2 wordpress-sites. Wordpress is installed under /var/www/html with the first created site and reachable under "server-ip". Then I decided for a network to realize a mobile version of the site with a different theme. Now the second site is reachable under "server-ip/mobile-site/". However it doesn't matter how I log in: „server-ip/wp-admin/“ or „server-ip/mobile-seite/wp-admin/“ or „…/wp-login.php“ I almost every time end up in the dashboard of the site under "server-ip". Using two different themes for the sites does not work either, it always takes the chosen theme for both sites.
Did I messed up my wordpress-installation with creating a multisite? Can I fix this without destroying any site-content and how can I do that?
Or could it be possibly the .htaccess-file? What is the issue?
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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|json).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
Thanks for the help in advance.
Share Improve this question asked Apr 9, 2019 at 8:16 ZehkeZehke 11 bronze badge 1- Does the front end load okay? Have you tried this subdirectory .htaccess code? – Steve Commented Mar 10, 2022 at 7:37
1 Answer
Reset to default -1This is the .htaccess I used for multisite:
RewriteEngine On
RewriteBase /
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]