404 Error on Subdomain in Multisite setup on Windows 11 machine

Issue Summary

Trying to get subsites to work on a local multisite. I’m getting this 404 screen.

Troubleshooting Questions

  • Does this happen for all sites in Local, or just one in particular? All multisites

  • Are you able to create a new, plain WordPress site in Local and access it in a Browser? Yes.

Replication

I changed the subsite names to end with .localdev
image

I clicked the ‘Sync MultiSite domains to hosts file’.

But all I get is the 404 screen.

System Details

  • Which version of Local is being used? 6.6.1+6281

  • What Operating System (OS) and OS version is being used?
    Windows 11 Pro

  • Attach the Local Log. See this Help Doc for instructions on how to do so:

Hello there @Belinda -

Thank you for your question. Where did you update the sites to end with .localdev?

Was that within WordPress or within Local under Site domain?

I just tested and changed the domain within Local under Site domain, clicked Sync Multisite domains to host file, and then did a hard refresh of the site (before that I also received a 404 error).

Let me know if that helps!

Sam

Thank you for your reply.

I changed the subsite from within wordpress.

The main site domain in local works, so I don’t know why I would change it there.
I’m only having issues when I’m trying to access the subsites not the main site.

Hello @Belinda -

Have you tried updating the site URL within the Local app? Wondering if that might help (and of course, clicking Sync MultiSite domains to hosts file again)?

Shared with CloudApp

Before making any further changes, I would of course recommend making a backup of your site (if you haven’t already):

Thank you,

Sam

Thanks again for your help. I changed the main site name from within Local like you suggested and ran the Sync MultiSite domains to hosts file again. The main site still works BUT the subsites still don’t work. I get the same 404 Error on the subsites.

Any other thoughts?

Hi there @Belinda -

What is the Local configuration for this site?

  • web server
  • PHP version
  • database
  • WordPress version

Thanks!

Sam

I’m not sure if this is still an issue for you, but I had the same (or similar) issues and finally got it working.

  1. I rebooted (eye roll). I found a thread on this forum where it was suggested. I had compared config files and followed all other recommendations. I had even gone so far as to do a clean/empty install of a single site – and was still getting a 404. Rebooting not only helped my sample/test sites load, I was able to do what I wanted to do from the beginning – import a giant (over 70 sites and something like 20GB) multisite backup from WP Engine.

  2. After importing the multisite, the Local dashboard listed the site (and still does) as not being a multisite (and thus no “sync” link). None of the add-on sites would resolve. It took some time because of the number of sub-sites we have, but I added 4 lines for each to my hosts file (replacing subdomain1 with the appropriate subdomain and domain with the correct domain):

::1 subdomain1.domain.local #Local Site
127.0.0.1 subdomain1.domain.local #Local Site
::1 www.subdomain1.domain.local #Local Site
127.0.0.1 www.subdomain1.domain.local #Local Site

And, of course, I made sure the the URLs in the Wordpress Dashboard matched what I put in hosts.

All works great for me now. The set-up took a little time, but I’m hopeful that I won’t run into recurring issues I had with my old set-up (XAMPP).

1 Like

Thank you for coming by and sharing your notes @tgranzo! :green_heart:

2 Likes

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