trying to shift document root on existing subdir multisite
-
So, I will start this off by admitting right up front that I may be going about this entirely the wrong way, and I’m happy for any and all guidance on different paths/strategies to make this work.
The situation is this: I have a multisite (subdirectory) install of WP that lives in /var/www/wordpress. My document root is /var/www, and other, static content lives under the rest of this tree. So this means that my sites have urls like http://www.server.com/wordpress/testsite. This works totally fine, were it not for those pesky users. I have been asked to get rid of “wordpress” inside the url string.
After banging my head against various apache redirects and doing some testing on a separate server, the best solution seemed to be to move DocumentRoot to /var/www/wordpress, and use redirects in apache to catch static content urls and bypass WP. On my test server, where I set it up this way from the get-go, this worked lovely.
So now I’m trying this on my production server (well, on a clone of it, anyway) and the problem is that I have a lot of existing sites. I changed DocumentRoot in apache, changed the .htaccess in /var/www/wordpress to reference / instead of /wordpress/, updated wp-config.php, and updated all the tables in my wordpress db using the recommended Search and Replace tool to change http://www.server.com/wordpress/ to http://www.server.com/. I also updated wp_site and wp_blogs to be correct.
Now what happens is if I go to http://www.server.com I get my main wordpress site. This works. I can log in to wp_admin, yay!
So: http://www.server.com –> goes to wordpress primarysite
http://www.server.com/wp-admin –> goes to wp-admin page for primary siteBut:
http://www.server.com/primarysite –> gives a WP Page Not Found error.All my non-primary sites are also broken. When I try to “visit” them either from My Sites or directly by URL, I get the same Page Not Found error. However, when I go to http://www.server.com/secondarysite/wp-admin, I can actually log in to the wp-admin page. If I create a post from there, though, it publishes it to my primary site.
My guess is that there’s something else in the db that needs to get changed that I haven’t found, and I’m at a loss for next things to look for or try.
Help?
Thanks so much 🙂
- The topic ‘trying to shift document root on existing subdir multisite’ is closed to new replies.