Newly created sites (latest version of Local, fresh install, latest WP version) give me a 404 (also via Live Link), both http and https. Mailpit and NeoAdmin working fine but site can’t load. Loding https it says database connection error.
Not sure how to replicate. I’m using Mac Intel i7 running Monterey (last compatile MacOS with my machine), latest LocalWP and WordPress versions, tried different MySQL and PHP, also tried Apache instead of NGinx. 404.
I’ve managed to restore an old backup that always gave me errors on LocalWP previous versions. But it’s the only site I’ve managed to run. Any fresh install will return 404 errors constantly.
It seems some routing issue. LocalWP suggests to change Site Domains to localhost, but this wouldn’t work for me as I need HTTPS to work.
LocalWP is writing on my hosts file, but it points conflicts all the time. Despite the Site Domain error on LocalWP, my restored Multisite works perfectly including HTTPS. It only fails the GZip compression (that is supposedly active on Nginx Server at LocalWP) and Browser Cache (also on nginx.conf).
When you say newly created sites are giving a 404 are you talking about a new, blank site in Local or are you creating subsites for your multisite install that are throwing 404s?
Based on your logs it does seem like there might be a port conflict at play. Are you running other developer applications simultaneously? That could also cause similar issues. Apps like MAMP, XAMPP, or Docker for example.
Here are some additional steps to help troubleshoot:
Stop all sites that are running in Local
Force quit Local
(If using Mac) Run the command lsof -nP -iTCP -sTCP:LISTEN
(If using Windows) Run the command netstat -ano
What you’ll be looking for here is to see when sites are stopped and Local is properly shut down if there are still programs running on ports 80 and 443. These may be conflicting with Local or the system may be reporting Local is still running.
Once you run that command you should see a list of listening ports. If you see a particular program making use of those ports, you can then kill that process by running sudo kill -9 XXX where XXX is the PID number of that process. (On Windows you will use taskkill /F /pid XXX where XXX is the PID number of that process)
I’m not using any other local develpment environment. My system never had any other than LocalWP, and sicne I’ve upgraded to Monterey, it’s my first time now with LocalWP after a few years away (couldn’t restore my Local site). Below are the ports my Mac was listening to: