Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

MAMP: Changing ports in Preferences panel.

Hi, I'm doing WP development course with Zac Gordon. I've installed MAMP on Mac 10.10. Trying to change the port to 80 and 3306. It gives me 3 fields to fill in: Apache, Nginx, MySQL. I've clicked on "Set Web & MySQL ports to 80 & 3306. What do I fill in for Nginx?

Then it gives me the following message:

"“There is a problem with the server ports. Each server must be assigned a unique port. Please check your configuration.”

5 Answers

Hi Fayrooz,

The problem is that every port can have one user assigned to it.

Stop servers with the "Stop Servers" button then:

Go to the Preferences in the main MAMP window -> 4 dropdown tabs open when you click on the button and navigate to the Web Server tab -> There you can choose which server do you want to use Apache or Nginx.

A tip: There change the Document Root to another Folder you create just that you don't overwrite something that you don't want to:)

Hope this helps :)

Just a guess here but I bet that your default Apache web server is still running (which means it is already using the default port number like 80 for HTTP)

launch your terminal app then type sudo apachectl stop

Shut down MAMP completely and restart it and you should be able to assign port 80, etc... in MAMP.

Well that would work on a Server installed internally on the Mac but to stop a MAMP Server you have to use the App.

Or else it throws an error that the server isn't running (it uses the MAMP apachectl script to start the server).

Hi, Thanks Shawn, I tried MAMP Pro instead to see if that works, the options are little different, no NGinx. I clicked on 'Set Apache and MySQL ports to 80,443,3306' and no error message.

Regards Fayrooz

Hi Nejc :)

I usually see that problem when the default apache server on OS X is still running when you launch MAMP. The apache severs runs on the default ports for HTTP, FTP, MySQL, etc...

So the solution if you want to run MAMP on the defaults (80, 443 and 3306) you have to either shut down the default OS X apache server or change the ports that that apache server runs on.

I was saying use sudo apachectl stop to stop the default OS X apache server :)

hope I am making sense!

To clarify I guess I should say that OS X comes with an apache server already installed and running out of the box, and it is running on 80, 443 and 3306.

If you want MAMP to use those ports you have to first shut down the OS X apache server.... :D

Hi Shawn,

Yeah you are right. Sorry for misunderstanding you :)

I use a Source Compiled Apache cos the one bundled with the OSX is mostly an older version :) And I prefer to have all the files under one hood and not all around the system.

All it takes are a few symlinks and you are under way or just add the folder to the enviroment variables and disabling the original Apache run scripts.

Have to try Nginx in the future: Apache is quite nice but compiling additional modules can be a pain in the arse sometimes:)