Run multisite in subdirectory and access from root problem
-
Hi all,
I have installed my wordpress in root/wp/ but the url to access it is https://www.site.com/wp. I want to be able to access it from the root at https://www.site.com. I found instructions in the codex here and have followed it.
Here is what I end up changing:
- Changed wp_options siteurl to https://www.site.com/wp
- Changed wp_options home to https://www.site.com
- Made sure wp_blogs path was / for first site and /site/ for each subsequent site
- wp_site domain is set to https://www.site.com and path is set to /
- wp_sitemeta is set to https://www.site.com/
- .htacces in root has RewriteBase /site/
- .htaccess in /wp folder also has RewriteBase /site
- in wp-config.php define(‘DOMAIN_CURRENT_SITE’, ‘www.site.com’); and define(‘PATH_CURRENT_SITE’, ‘/’);
At first I thought it had worked. On the front end, the urls were right. When I log in, the url takes on the full path https://www.site.com/wp/site. I can live with that. However, what I can’t live with is when I access the widgets page, each site is loading the default or root site widgets instead of its own widgets. Making changes to these widgets in any site changes the root site.
The only way I have found a fix for this issue is to make sure the wp_options siteurl is not set to https://www.site.com/wp but instead https://www.site.com. Then when I visit each site in the backend, the url is https://www.site.com/site instead of https://www.site.com/wp/site and the widgets load and save their own sites widgets.
However, this fix causes an issue with logging in and out. When you try to log out i get a 404 error because the url does not have the /wp in it. When logging in at https://www.site.com/wp-login.php I get a 404 but when I try https://www.site.com/wp/wp-login.php the login page loads, but then redirects to a 404 after I hit login button.
So can some tell me if my settings are wrong somewhere or is this a bug in wordpress.
Thanks for any help,
Adrian
- The topic ‘Run multisite in subdirectory and access from root problem’ is closed to new replies.