{"id":18,"date":"2023-06-30T10:23:57","date_gmt":"2023-06-30T02:23:57","guid":{"rendered":"https:\/\/clifford.io\/blog\/?p=18"},"modified":"2024-05-06T07:56:10","modified_gmt":"2024-05-05T23:56:10","slug":"install-mamp-local-php-development-environment","status":"publish","type":"post","link":"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/","title":{"rendered":"How to install MAMP as a local PHP development environment"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_60 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\" role=\"button\"><label for=\"item-69d258845fb8c\" ><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input aria-label=\"Toggle\" aria-label=\"item-69d258845fb8c\"  type=\"checkbox\" id=\"item-69d258845fb8c\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#What_is_MAMP\" title=\"What is MAMP\">What is MAMP<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#Step_1_Download_MAMP\" title=\"Step 1: Download MAMP\">Step 1: Download MAMP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#Step_2_Install_MAMP\" title=\"Step 2: Install MAMP\">Step 2: Install MAMP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#Step_3_Launch_MAMP\" title=\"Step 3: Launch MAMP\">Step 3: Launch MAMP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#Step_4_Configure_MAMP\" title=\"Step 4: Configure MAMP\">Step 4: Configure MAMP<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/clifford.io\/blog\/install-mamp-local-php-development-environment\/#Step_5_Test_the_Installation\" title=\"Step 5: Test the Installation\">Step 5: Test the Installation<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_is_MAMP\"><\/span>What is MAMP<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>MAMP (Mac, Apache, MySQL, PHP) is a popular tool for local PHP development on macOS. It provides a complete web development environment that includes the necessary components for running PHP applications locally, such as a web server (Apache), a database server (MySQL or MariaDB), and PHP itself. MAMP makes it easy to set up and manage these components, allowing PHP developers to work on their projects without the need for a live server.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/clifford.io\/blog\/wp-content\/uploads\/2023\/11\/install-mamp-1024x529.png\" alt=\"install mamp\" class=\"wp-image-111\" srcset=\"https:\/\/clifford.io\/blog\/wp-content\/uploads\/2023\/11\/install-mamp-1024x529.png 1024w, https:\/\/clifford.io\/blog\/wp-content\/uploads\/2023\/11\/install-mamp-300x155.png 300w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here are the step-by-step instructions to download and install MAMP on macOS:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_Download_MAMP\"><\/span><strong>Step 1: Download MAMP<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Visit the official MAMP website at <a href=\"https:\/\/www.mamp.info\/.\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">https:\/\/www.mamp.info\/.<\/a><\/li>\n\n\n\n<li>Click on the &#8220;Download&#8221; button to access the download page.<\/li>\n\n\n\n<li>On the download page, you will find two versions: MAMP (free) and MAMP PRO (paid). For most PHP development purposes, the free version is sufficient. Click the &#8220;Download&#8221; button next to the free version.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_Install_MAMP\"><\/span>Step 2: Install MAMP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Once the download is complete, locate the downloaded file (typically in your &#8220;Downloads&#8221; folder).<\/li>\n\n\n\n<li>Double-click the downloaded file to start the process to install MAMP.<\/li>\n\n\n\n<li>Follow the on-screen instructions to proceed with the installation.<\/li>\n\n\n\n<li>You may be prompted to enter your administrator password during the installation process. Provide the necessary information to continue.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_3_Launch_MAMP\"><\/span>Step 3: Launch MAMP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>After the installation is complete, navigate to your Applications folder and find the MAMP folder.<\/li>\n\n\n\n<li>Open the MAMP folder and double-click the &#8220;MAMP&#8221; application icon to launch MAMP.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_4_Configure_MAMP\"><\/span>Step 4: Configure MAMP<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Once MAMP is launched, the MAMP control panel will appear.<\/li>\n\n\n\n<li>In the control panel, click on the &#8220;Start Servers&#8221; button to start Apache and MySQL. The server status indicators will turn green once the servers are running.<\/li>\n\n\n\n<li>By default, MAMP uses port 8888 for Apache and port 8889 for MySQL. If you prefer different ports, you can change them in the Preferences section of the control panel.<\/li>\n\n\n\n<li>In the control panel, click on the &#8220;Open WebStart page&#8221; button. This will open the MAMP start page in your default web browser.<\/li>\n<\/ol>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_5_Test_the_Installation\"><\/span>Step 5: Test the Installation<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>On the MAMP start page, you will see information about the server environment and configuration.<\/li>\n\n\n\n<li>To test if PHP is working correctly, click on the &#8220;phpMyAdmin&#8221; link in the Tools section. This will open phpMyAdmin, a web-based tool for managing MySQL databases.<\/li>\n\n\n\n<li>If phpMyAdmin opens successfully, it means that PHP and MySQL are working correctly with MAMP.<\/li>\n<\/ol>\n\n\n\n<p>Congratulations! You have successfully installed and set up MAMP on macOS for PHP development. You can now create and work on your PHP projects by placing them in the &#8220;htdocs&#8221; folder located within the MAMP installation directory. Access your projects through a web browser by entering &#8220;<a href=\"http:\/\/localhost:8888\/\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8888\/<\/a>&#8221; (or the custom port you set) followed by the project folder name. For example, if you have a project named &#8220;myproject&#8221; inside &#8220;htdocs,&#8221; you can access it at &#8220;<a href=\"http:\/\/localhost:8888\/myproject\/\" target=\"_blank\" rel=\"noopener\">http:\/\/localhost:8888\/myproject\/<\/a>&#8220;.<\/p>\n\n\n\n<p>If you&#8217;ll like to take your development environment to the next level, learn how to <a href=\"https:\/\/clifford.io\/blog\/configuring-a-custom-domain-name-on-mamp\/\" data-type=\"post\" data-id=\"22\">configure a custom domain using MAMP<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MAMP (Mac, Apache, MySQL, PHP) is a popular tool for local PHP development on macOS. It provides a complete web development environment that includes the necessary components for running PHP applications locally, such as a web server (Apache), a database server (MySQL or MariaDB), and PHP itself. MAMP makes it easy to set up and manage these components, allowing PHP developers to work on their projects without the need for a live server.<\/p>\n","protected":false},"author":1,"featured_media":19,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10,11,9,8],"class_list":["post-18","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development","tag-apache","tag-mamp","tag-mysql","tag-php"],"_links":{"self":[{"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/posts\/18","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/comments?post=18"}],"version-history":[{"count":4,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions"}],"predecessor-version":[{"id":113,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/posts\/18\/revisions\/113"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/media\/19"}],"wp:attachment":[{"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/media?parent=18"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/categories?post=18"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clifford.io\/blog\/wp-json\/wp\/v2\/tags?post=18"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}