How to Install Mamp Local Server On Macbook

How to Install MAMP Local Server on MacBook: A Step-by-Step Guide


Step 1: Download MAMP 

Visit the MAMP website: Open your web browser and go to www.mamp.info.

 Choose MAMP version: You’ll see two versions available: MAMP and MAMP PRO. For most users, the free version (MAMP) is sufficient.

 Click on the “Free Download” button. Download the installer: The download will begin automatically. The file will be a .pkg file, which is the installer package for Mac.

Step 2: Install MAMP on Your MacBook

Locate the installer: Once the download is complete, navigate to your "Downloads" folder and find the .pkg file. 

 Open the installer: Double-click on the .pkg file to start the installation process. 

 Follow the on-screen instructions: The installer will guide you through the installation steps. 

Click “Continue” on each prompt, and agree to the software license agreement. Select the installation location: You can install MAMP in the default location or choose a different folder. Most users will keep the default settings. 

 Complete the installation: Click "Install" to begin the process. You may be asked to enter your Mac’s administrator password. Once done, click "Close" to finish.

Step 3: Start MAMP and Set Up Your Local Server

Launch MAMP: Go to your “Applications” folder and open the "MAMP" folder. 

Double-click the "MAMP" icon to start the application. 

Start Servers: When MAMP opens, click the “Start Servers” button. This will start the Apache (web server) and MySQL (database) servers on your Mac. Access your local server: Once the servers are running, MAMP will automatically open a new tab in your web browser displaying the MAMP start page. Your local server is now up and running at http://localhost:8888/

Step 4: Configure MAMP (Optional)

Change Ports: By default, MAMP runs on ports 8888 (Apache) and 8889 (MySQL). 

You can change these by clicking on “Preferences” in the MAMP window, then selecting the “Ports” tab.

 Document Root: The document root is where you store your website files. By default, it’s located in Applications/MAMP/htdocs.

You can change this location in the “Web Server” tab under “Preferences.” PHP Version: MAMP allows you to switch between different versions of PHP. This option is also available under the “PHP” tab in “Preferences.

Step 5: Test Your Local Website

Create a test file: Navigate to the document root (Applications/MAMP/htdocs) and create a new file named index.php. 

Add some code: Open index.php in a text editor and add the following PHP code: php





Visit your local server: Open your web browser and go to http://localhost:8888/. You should see a PHP information page, confirming that your local server is working correctly.

Comments