I am stuck in a "port conflict" loop and have no idea what to do

What issue or error are you experiencing?

I cannot spin a site up in LocalWP without having the “There is a port conflict with this site’s domain” error showing up. When trying to access the site’s admin, it goes to a 404.

This happens with every site I spin up, pull or import.

I am at a complete loss for what to do, and, if someone is even willing to possibly zoom with me to help me figure this out, that’d be greatly appreciated.

I am not that savvy when it comes with local networks and ports, mainly because it’s been a few years since I’ve had to mess with that stuff.


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Not exactly sure if this can be replicated on anyone else’s end..

But I’ve tried uninstalling LocalWP, clearing out my DNS stuff, removing all my local sites and clearing out my local SSL certs to start entirely fresh, and this issue is still persisting…

System Details

  • Local Version: Version 9.2.8+6882

  • Operating System (OS) and OS version: MacOS 15.6.1 (24G90)


Local Logs

Attach your Local Logs here (Help Doc - Retrieving Local’s Log)

local-logs1.zip (296.4 KB)


Security Reminder
Local does a pretty good job of scrubbing private info from the logs and the errors it produces, however there’s always the possibility that something private can come through. Because these are public forums, always review the screenshots you are sharing to make sure there isn’t private info like passwords being displayed.

Hi @rtl92!

The easiest fix for this is to just change your Router Mode to Localhost. You can do this by navigating to Preferences>Advanced>Router Mode and then selecting it from the drop down. After that you’ll click Apply in the bottom right hand corner.

I tried that and when trying to pulling the site in localhost routing mode, I get this error:

TypeError: Cannot convert undefined or null to object

at Object.entries ()

at PortsService. (/Applications/Local.app/Contents/Resources/app.asar/main/sites/PortsService.js:107:62)

at Generator.next ()

at /Applications/Local.app/Contents/Resources/app.asar/main/sites/PortsService.js:8:71

at new Promise ()

at __awaiter (/Applications/Local.app/Contents/Resources/app.asar/main/sites/PortsService.js:4:12)

at PortsService.checkAndReplaceUnavailablePorts (/Applications/Local.app/Contents/Resources/app.asar/main/sites/PortsService.js:101:16)

at SiteProcessManagerService. (/Applications/Local.app/Contents/Resources/app.asar/main/sites/SiteProcessManagerService.js:272:57)

at Generator.next ()

at fulfilled (/Applications/Local.app/Contents/Resources/app.asar/main/sites/SiteProcessManagerService.js:5:58)

When trying to import my site manually, I get a “Error: Local was unable to import the following SQL files:” message.

This is seriously killing me on time, all I want to do is import blog posts and pages to a new site without having to that on flywheel’s server and kill server resources..

For the Port Conflict, if you switch back to Site Domains, you can try these steps to help identify and address the issue:

  • 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)

After that, you should be able to retry. Keep us posted if you have any questions or continuing issues.

There are also some more details around this and other troubleshooting steps at this link if needed: Stopping Whatever Is Listening On Port 80.


For the site import issue were you importing a zip file or trying to manually import just the database using Adminer or Site Shell?

Hey again Nick,

Thank you so so much for taking the time to help me with this, I really appreciate this :slight_smile:

I went ahead and went through those steps and killed anything that was using port 80 after force-quitting LocalWP. After that, I restarted LocalWP and tried to import website manually via zip file and got the SQL import error message again, attached log file below.

And I am importing via zip file on my macbook pro, using File > Import Site and selecting the downloaded zip file I got from the flywheel server’s backups.

sql-error.log (2.2 KB)

Thank you so so much again!!

As a workaround, could you try importing the site manually? The steps would look like this:

Manually Import a Local Site

Thank you! I have’t tried an actual manual import, but will give this a try in a bit and get back with you :slight_smile:

1 Like

Any luck with that @rtl92?