Fix MAMP's error: port is in use

This post shares how I fixed one of the MAMP's error saying

"Apache couldn't be started because port 80 is in use by some other software."

Somehow I couldn't install MAMP again, so I tried the following commands on Mac's terminal. Then the error had gone, MAMP started working properly again.

1. Search software that is using the local server

Open the terminal on Mac. Once the prompt comes up, try the following command. The command uses a port number as a key to retrieve the software's information. For instance, I used port number 80, so I put ":80" at the end.

lsof -i :80

If the port is in use, a list of the software will be displayed. Otherwise, a new prompt shows up again, meaning no software is using the port.

2. Delete The Software by PID

When I deleted all the software by using PID shown in the list, MAMP started working as normal. (If there are unsaved projects, I'd recommend saving them before try deleting though I'm not sure if it's necessary.)

kill -QUIT 925
kill -QUIT 4352
# if multiple PIDs, delete all

Hope this helps.

\ Share /

Leave a Comment

CAPTCHA