How to Install Apache, MySQL and PHP (MAMP) in macOS

This guide will show you how to quickly and easily install MAMP, so you can use Apache (and Nginx), PHP and MySQL on your Mac.

Although this guide was initially published in 2008, it has been updated to be current in 2021.

Before you go any farther, there is an alternative to installing MAMP that may accomplish the same thing (local access to AMP) but with more features. You can run LAMP (Linux, Apache, MySQL and PHP) in as a virtual machine via a Bitnami stack for VirtualBox (or VMware Player) and accomplish almost the exact same thing. Depending on exactly what you want to do with AMP there may even be a specific Bitnami stack already completely configured – for example, WordPress. You may want to review the documentation for Bitnami and the documentation for MAMP to decide which one best suits your specific needs.

If you decide to go the MAMP route instead of a virtual machine running LAMP – here’s how to install, setup and use MAMP on your Mac. MAMP works in versions macOS 10.12 and later (including macOS 11 “Big Sur”).

  1. First things first, download MAMP. Run the .pkg file to start the installation. For the most part you’ll click Continue a bunch of times.
  2. the first screen in the MAMP install wizard

  3. Once the installation has completed, open a Finder window and navigate to your Applications folder, select MAMP and then double-click MAMP.app to start MAMP.
  4. a Finder window with an arrow pointing at MAMP.app

  5. The first time you launch MAMP a window with info on MAMP Pro will appear. For now, close this window. If you want you can check out the MAMP Pro features later.
  6. an in app upgrade ad

  7. Before you jump in, click the Preferences button found in the upper-left corner of the MAMP panel.
  8. an arrow pointing to a Preferences button

  9. Take a look at each of the preferences and settings and make any changes you see fit. When you’re done, click the OK button.
  10. the MAMP Preferences panel

  11. Back in the main MAME window, click the Start button found in the upper-right corner of the panel.
  12. an arrow pointing to a Start button

  13. It will take a moment or two for each of the services to start up.
  14. an in progress graphic

  15. When everything has completely started up, the Start button will become green. Click the WebStart button.
  16. a start button with a green background

  17. A browser window will open and display info about your Apache, MySQL and PHP settings. From here you can launch tools like phpMyAdmin – which you can also do by entering the URL:

    http://localhost:8888/phpMyAdmin/?lang=en

  18. a web browser with the MAMP install info
    click to enlarge

  19. If you click the My Website link you’ll be taken to the placeholder page for where you can put all of your web files. You can also access the My Website link by entering the URL:

    http://localhost:8888/

  20. a browser window with the default php file being displayed

  21. Open a Finder window and navigate to your Applications and then select the MAMP folder. In here you’ll see a folder named htdocs – this is where you can put your web/php files and then access via http://localhost:8888
  22. a Finder window with an arrow pointing to a folder named htdocs

  23. That’s it – now you’ve got a working Apache, MySQL and PHP setup on your Mac.

If you ever find yourself in need of Apache, MySQL and PHP in Windows, check out our guide for installing and setting up WAMP.


If this article helped you, I'd be grateful if you could share it on your preferred social network - it helps me a lot. If you're feeling particularly generous, you could buy me a coffee and I'd be super grateful :)

buy a coffee for simplehelp.net


Home » Web Design & Dev » How to Install Apache, MySQL and PHP (MAMP) in macOS

2 thoughts on “How to Install Apache, MySQL and PHP (MAMP) in macOS”

  1. This is really a very easy way otherwise installing MYSQL, Apache and php is very difficult and configuring is more hectic job.

Leave a Comment

Your email address will not be published. Required fields are marked *