MAMP Local Development Environment Guide

Run Apache, MySQL, and PHP on macOS or Windows using MAMP, defaulting to http://localhost:8888.


MAMP (Mac/Windows + Apache + MySQL + PHP) is an integrated local development environment for macOS and Windows, easy to install, suitable for local debugging of PHP and WordPress.

Default localhost Access

PurposeAddress
Default Site (Commonly used with MAMP)http://localhost:8888
MAMP PRO / Standard Port 80http://localhost
phpMyAdminhttp://localhost:8888/phpMyAdmin/

The free version of MAMP typically uses Apache port 8888 (to avoid conflict with system port 80) and MySQL port 8889.

Installation and Startup

  1. Download MAMP (or MAMP PRO) from mamp.info.
  2. Open MAMP and click Start to launch Apache and MySQL.
  3. Access in your browser at http://localhost:8888.

Website Root Directory

  • macOS: /Applications/MAMP/htdocs/
  • Windows: C:\MAMP\htdocs\

Place your project in htdocs/myproject/http://localhost:8888/myproject/

MAMP PRO

The PRO version supports multiple virtual hosts, SSL, and switching between different PHP versions, with local domain names like http://myproject.test (requires hosts configuration).

Common Issues

Unable to access 8888
Ensure the MAMP server is running (indicated by a green light).

Change default port
MAMP Preferences → Ports, can be changed back to 80 / 3306.

Conflict with macOS built-in Apache
Stop the system Apache: sudo apachectl stop, or continue using 8888.

Summary

MAMP is one of the most popular PHP local stacks on Mac, defaulting to http://localhost:8888, with the project directory being htdocs.

访客计数:------ Best viewed in Netscape Navigator · 800×600 © LocalHost Run