"Local Router Error" message on multi-network instance

I’m trying to restore a multnetwork multisite instance of WP 4.8 to a clean multisite instance on Local (v2.0.4 Mac) from a “All-in-One WP Migration” backup of the production site and am encountering this page in the browser when I try to browse to the second network’s first site. Has anybody had a similar issue, and if so, how was it resolved?
To elaborate, I’m implementing multiple networks using core functionality exposed through the WP Multi-Network plugin (v 2.1.0) by John James Jacoby. The restore procedure entails a clean install of WP multisite on Apache (I’ve tried Nginx as well) followed by installing and activating the AIOWPM plugin and importing an archive of NetworkA-SiteA. That happens without issue and I can access the backend and frontend. Next step is to create a new network and default site (NetworkB-SiteA) and import an archive of that from the production server. After a successful import (the DB and folder structure reflects the appropriate changes), if I try to browse to NetworkB-SiteA (either by clicking the “My Sites” link in the admin bar or directly entering the URL), I’m shown the Local Router Error page. I’m still able to load NetworkA-SiteA just fine. I have to mention that I’ve edited my hosts file to include the domains for NetworkA-SiteA as well as NetworkB-SiteA in the same way as the Local entries in the hosts file.

Any insights, directions, feedback would be greatly appreciated.

This thread may help. Timeouts during nginx xdebug session

Update: Unfortunately, no. That doesn’t help resolve it. I tried the suggestions, but still having the same issue. While sites on NetworkA can be accessed, NetworkB sites keep pulling up the error page.
I also tried to modify virtualhost to add serveralias for NetworkB-SiteA.test, and restarted the server, but that only resulted in an apache 500 page for both NetworkA-SiteA and NetworkB-SiteA.
So the problem still persists.
On a related note, is the multi-network implementation common among Local users?

Cecil, if you haven’t already done so, I recommend checking your docker settings.

I got the same message after trying to add a new site. I tried several of the suggestions and still did not regain access to my original site. After trying some of the suggestions, the error changed from a local router error to errors indicating that my browsers were unable to establish a connection.

I’m not sure how my situation got fixed because I had a lot of help after trying it on my own for 4 days; but it sounds as if you have a much stronger technical background than I. My issue was an easy fix once discovered. It had something to do with the docker settings, which I never touched.

Good Luck!!! :smirk::scream::slightly_smiling_face:


Hi Cecil,

What type of multisite set up is it? Subdomain, mapped domains, or subdirectories?

Multi-network is a multisite of multisites.

1 Like

Thanks for the insight, @Carolyn43. I’m still quite new to Local (having switched from Mamp), and not quite familiar with how it works. I just learned about the Virtual Box association. Though it sounds like your symptoms were a bit different (for me, the original site works fine, but the newly created network and its sites do not), I’ll look into the docker bit you suggested. Either way, I see no harm in learning more about Local - time permitting.

Exactly as @afragen pointed out . It’s multiple networks of multisites on one WP instance. It’s native to WP core, which is different from plugins mapping domains to multisite blogs.
To answer a part of your question though, the networks are FQDN TLDs with subdomain only mutlisites.

Thanks for the clarification, @afragen. Have you any experience with multi-network instances on Local?

Unfortunately I have no experience with multi-network installations.

Well, thanks for your input, in any case. You and @Carolyn43 have set me on a track. I think it’s got more to do with how Local handles routing (proxying?) domain names. Unfortunately, I’m not very familiar with all the conf files ins-and-outs, and I’ve discovered files with the main domain/subdomains (ie. NetworkA-SiteA,SiteB, etc) specified. I feel what I want to achieve may involve tinkering with those values. Meanwhile, I’ll remain hopeful perhaps @clay or other Local devs and engineers will be able to offer me a resolution fingers crossed.

I managed to get local to “route” to the second network. For anyone interested (and future reference), I’ll illustrate how I achieved that.
(This applies to Macs only)

  1. Create a new WP multisite (subdomain) instance in Local (this will be the first/default site/network, for eg. example-a.dev)
  2. In the browser, visit example-a.dev/wp-admin and log in
  3. Be sure to have multi-networks enabled before carrying on.
  4. At this point, I can create example-a.dev subdomain sites (eg: sub1.example-a.dev, sub2.example-a.dev, etc)
  5. Create a new network (say, example-b.dev)
  6. If you try to browse to example-b.dev at this point, the browser will load the “Local Router Error” page (router-error.html)
  7. You can’t creat subdomain sites for example-b.dev at this point in time, but the network and default site will be registered
  8. In Finder or terminal, browse to ~User/[profile-folder]/Library/Application Support/Local by Flywheel/routes/
  9. Copy and paste the example-a.dev.conf and rename the copy to example-b.dev.conf
  10. Open the example-b.conf in your text editor of choice
  11. Find and replace any instances of “example-a.dev” to “example-b.dev” - except, perhaps, the ssl cert and key references.
  12. Save and close, then restart the example-a.dev instance in Local
  13. After that, it’s possible to browse to example-b.dev in addition to example-a.dev
  14. You’ll have to log in with the superadmin account when accessing example-b.dev/wp-admin
  15. From here on out, you can create subdomain sites (eg: sub1.example-b.dev, etc)
    If you want to create a new network, repeat steps 5 to 12 above.

Update & disclaimer: Not sure if this is a real fix, but some things are working. Would be great to get some validation from people in the know about this.

There are a few inconsistencies with this “fix”.

  • As far as I know, this works with subdomains multisite multinetworks, I haven’t had time to test for subdirectory multisite instances.
  • After step 12 above, I noticed that ability to “sync” multisite domains to hosts file had no effect. In fact, a previously synced subdomain went missing from the list of domains in the local hosts file.
  • Normally, each domain or network (and any associated sites or subdomains) added in WP is listed in the admin bar under the My Sites menu item. After implementing the above stated steps, this is no longer the case. The first domain/network/site and subdomains created before adding a network is now listed along with the very next site/domain/network added. Any other sites after this whole procedure do not show up in the admin bar, but are still displayed in the network admin backends and can be directly accessed via its URL.

Finally, I’m sure there is more wonkiness to be experienced, which I’ll post back here as and when I come across it. Again, Flywheel/Local community members and experts are more than welcome to chime in with their knowledge and expertise.


A similar process for Local Lighting (5.5.X) almost works, but doesn’t.
Paths are Win based.

  • Update C:\Users\username\AppData\Roaming\Local\run\nginx\certs to include a .crt / .key for networktwo.local.
  • Update C:\Users\username\AppData\Roaming\Local\run\nginx\ to duplicate route.networkone.local.conf doing a search/replace for all of the values that reference networkone for new neworktwo.

But when you specify to restart the networkone.local site within Local Lighting, the newly added .conf file in Local\run\nginx\ is deleted. Is there some way that a subset of .conf files can be identified as not in need of delete/regeneration?

Or a ‘custom’ folder that separate SSL and .conf files could be checked against?
Something that would allow multisite setup with various domain mappings to be tested.

Or a good example of the command line options to restart nginx (router) that will read the current/updated config but not also delete the files in subfolders? That way:

  1. One Time - Add new .conf files to ~\AppData\Roaming\Local\run\router\custom\
  2. Once per start/restart - Update ~\AppData\Roaming\Local\run\router\nginx\nginx.conf with an extra include statement.
  3. Once per start/restart - Run CLI command to restart nginx with local’s config.

The closest I’ve been able to get but still not reproducible successful or that doesn’t present stop/restart issues from Local UI after having done so.

cd ~/AppData/Roaming/Local/run/router/nginx/conf
~/AppData/Local/Programs/Local/resources/extraResources/lightning-services/nginx-1.16.0+3/bin/win32/nginx -c ./nginx.conf -g “pid …/logs/nginx.pid;” -s reload

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.