Starting up my Local server, I saw an environment update for the domain (to 1.2) and ran that, as well as the update for Local to 2.3.2. All seemed to work fine, untill I tried to visit one of the other sites in the network (sub-directory install); it seems no assets are loading. In the console there’s 54 404-errors loading css en js files.
Trying to login to one of the subsites backend gives and “endless redirect” error in the browser.
Any suggestion on how to solve this?
Taking some stabs in the dark…
- Do you have an example asset link that 404s (to rule out anything weird)? The domain/filename can be modified/fake - I’m more curious about what some of the URI paths look like.
- Do you have any security plugins, like iTheme Security, etc? If yes, you might try renaming it/them (for example, rename
ithemes-security2 so that WP deactivates it).
- Are you forcing SSL on the backend (and/or frontend), Locally? Perhaps you could try defining
WP_SITEURL in case something got mucked up in the DB.
- Whether or not you do #2, maybe try (temporarily) added
functions.php and loading the site?
- If you’re running Apache, maybe try moving/renaming
.htaccess, and if you can get into WP Admin, go to Settings > Permalinks and Save Changes?
- If you are using Apache, try switching (temporarily) to Nginx in Local, save settings, then switch back to Apache and save again.
- If all else fails (and assuming it lets you), try exporting the install, delete it from Local, then import it back in?
Just throwing some ideas out there. I would check my
hosts file to make sure everything looks kosher.
If I remember correctly, I had some issues with my
hosts entries getting truncated when I upgraded to 1.2.0. I haven’t noticed since (just after the upgrade), and if I recall, the export-delete-reimport fixed it. That may not work for your situation, though.
EDIT: On second thought regarding #5, you’ll probably just want to recreate (temporarily/as a test)
.htaccess based on what is in
Sorry for the trouble with the Environment Upgrade!
I’ve made a note in our issue tracker to look into upgrading from Preferred 1.1 to 1.2 with multisite (subdirectory) installations.
Thanks for your quick response.
Before reading your answer I did an export/import (on a new site with a different domain name), which did not work either. Then I set up a new multisite install from scatch, with a different domain name and with a custom environment using nginx and php 7.1, and then did an import off of the staging server of this site through WP Migrate DB Pro.
That seemd to work, but the site was loading once or twice and then timed out or did not load at all. Checking the log files, there was a warning:
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it.
I solved this by increasing the
pm.max_children setting in
conf/php/7.1.4/etc/php-fpm.d/www.config to 20 (from 5), as was suggested here, and it now runs smooth.
The filepaths in the not working version where correct, as in: http://site.url/sub-directoryname/wp-content/etc…
I still had that one and changed the environment settings also to “custom” and then it worked again too (although I also had to increase the pm.max_children setting).
Note: this is quite a big multisite install, with 9 sites and using WPML and lots of ACF content.
Hope this helps you to maybe find something.
I also upgraded to 2.3.2 and wasn’t able to reach any of my multisite subdirectories. I tried creating a new subdirectory multisite install from scratch and also couldn’t access any of the additionally created domains. It seems to be an issue for the Preferred environment 1.2.0 from what I can tell. I have since downgraded to 2.2.4 again which uses the Preferred 1.1 setup and creating a multisite works again.