How to easily install Apache, MySQL and PHP in OS X

Using MAMP, you can quickly and easily install Apache, PHP and MySQL on your Mac. Installing each package separately is totally possible, but MAMP offers a number of advantages vs. individual installations. MAMP will not alter or interfere with an existing version of Apache already running on your Mac. If Apache/MySQL/PHP are no longer needed, delete the MAMP folder and everything returns to its original status. Keep reading for a walk-through of the installation and initial setup.

  1. First things first, download MAMP. Open the .DMG file, review the license, and click the Agree button.

  2. click to enlarge

  3. Now drag the MAMP folder to your Applications. Ignore the MAMP PRO folder (unless you want to purchase MAMP Pro – it does include some extra features, but it’s not free).

  4. click to enlarge

  5. Give MAMP a minute to install.
  6. Navigate to your Applications, select the MAMP folder, and double-click MAMP.app.

  7. click to enlarge

  8. The MAMP interface will launch, and Apache and MySQL will start.

  9. click to enlarge

  10. Your browser will open and load the MAMP dashboard (http://localhost:8888/MAMP/?language=English). This page includes all of the info on the default settings for your MySQL server, and allows you to quickly access the included tools (phpinfo, phpMyAdmin and SQLiteManager)

  11. click to enlarge

  12. Select phpMyAdmin to configure your MySQL databases.

  13. click to enlarge

  14. Your web server “home” folder (document root) can be found in the htdocs sub-folder of MAMP.

  15. click to enlarge

  16. Place your .html, .php etc files in htdocs, and they’ll be viewable at http://localhost:8888
  17. Return to the MAMP interface application, and click the Preferences… button. The first tab allows you to control how the servers are started/stopped, if the start page should load when MAMP is opened, and the location of that start page.
  18. The Ports tab allows you to change the ports for Apache and MySQL.
  19. The PHP tab allows you to specify which version of PHP you’d like to use, if Zend Optimizer is enabled/disabled, and which cache to use.
  20. Finally, the Apache tab allows you to change the default Document Root.
{ 6 comments… add one }
  • dq9 August 9, 2008, 9:08 pm

    I used to use this to host my website, I used to pro version, but I could never figure out how to install an e-mail server using MAMP. Does any one know how to do this?

  • IT Buzz July 5, 2009, 6:49 am

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

  • Colin June 11, 2011, 12:06 pm

    This was SO hopeful. THANK YOU!!!

Leave a Comment