> ## Content Index
> Fetch the complete content index at: https://rolloutready.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Install XAMPP on Mac: A Clear Step-by-Step Guide
- URL: https://rolloutready.com/install-xampp-mac/
- Published: 2026-10-24T07:40:00.000Z
- Updated: 2026-10-24T07:40:00.000Z
- Description: This guide shows how to install XAMPP on Mac with clear steps for Apple Silicon and Intel Macs to run PHP and WordPress locally.
- Author: Daniel Hayes
- Tags: Web Development, Mac, XAMPP, Local Server, PHP

Setting up a local web development environment on your Mac can feel daunting, especially when you want to [run PHP scripts](https://rolloutready.com/install-php-mac/) or test WordPress sites without uploading files to a remote server. You might have come across XAMPP as a popular solution but are unsure how to install it correctly on your Mac, particularly if you own an Apple Silicon model like the M1 or M2.

This guide explains how to install XAMPP on Mac with clear, practical steps tailored for MacBook Air, MacBook Pro, and Apple Silicon users. It covers downloading the right version, installation nuances, configuring your first local server, running PHP and WordPress, and troubleshooting common issues.

## Key takeaways

- Download XAMPP for Mac directly from Apache Friends to ensure you get the latest compatible version.
- Apple Silicon Macs require specific XAMPP builds or Rosetta 2 for compatibility.
- Start your local server using the XAMPP control panel found in the Applications folder.
- Place PHP files in the "htdocs" directory inside the XAMPP folder to have them served locally.
- Uninstall or update XAMPP safely by stopping all services before removing the application folder.

## Before you start: What you need to install XAMPP on Mac

To successfully install XAMPP on your Mac, you need to ensure your hardware and software meet certain prerequisites. XAMPP bundles Apache, MySQL (MariaDB), and PHP to create a local server environment, but it does not include additional tools like Node.js or Python.

Your Mac should be running macOS version 10.13 (High Sierra) or later. Both Intel-based Macs and Apple Silicon models (M1, M2) are supported, but the installation process and compatibility details differ slightly for Apple Silicon, which requires specific versions of XAMPP designed for ARM architecture.

You must have administrator privileges on your Mac to install XAMPP, as it needs to write files to system directories and configure network ports. A stable internet connection is also necessary to download the installer from the official Apache Friends website.

If you already have local server software installed, such as MAMP or an existing Apache instance, it's advisable to back up your server files and databases to prevent conflicts or data loss. XAMPP uses default ports 80 for Apache and 3306 for MySQL, which may clash with other software.

| Compatibility       | Details                        |
| ------------------- | ------------------------------ |
| macOS Version       | 10.13 High Sierra or later     |
| Processor           | Intel or Apple Silicon (M1/M2) |
| Required Privileges | Administrator access           |
| Internet            | Stable connection for download |

## Downloading XAMPP for Mac: Where and how to find the right version

To download XAMPP for your Mac, start by visiting the official Apache Friends website at [apachefriends.org](https://www.apachefriends.org/index.html?ref=rolloutready.com). This is the most trusted source, ensuring you get the latest safe version without unwanted software.

On the download page, you'll find distinct options tailored for Intel-based Macs and Apple Silicon (M1/M2) models. Selecting the correct version is crucial for compatibility and performance. Generally, the website labels these versions clearly, such as "XAMPP for OS X (64-bit)" for Intel Macs and a separate build for Apple Silicon Macs.

Two main installer types are offered: the full installer and the portable version. The full installer sets up XAMPP system-wide and is recommended for most users. The portable version can run from any folder without installation, useful for testing or if you prefer not to modify system files.

After downloading, verify the file’s integrity to avoid corrupted or tampered downloads. The website provides checksums (usually MD5 or SHA256 hashes) alongside the download links. Use Terminal commands such as *shasum -a 256 \[filename\]* to generate a checksum on your Mac and compare it to the official value.

1. Open your web browser and navigate to [apachefriends.org](https://www.apachefriends.org/index.html?ref=rolloutready.com). You should see the download options for XAMPP prominently displayed.
2. Identify your Mac’s processor type by clicking the Apple menu > About This Mac. Note if it says Intel or Apple Silicon.
3. Choose the matching XAMPP download link: the Intel version for Intel Macs, or the Apple Silicon version for M1/M2 Macs. Confirm you see a file size and format (usually.dmg) before proceeding.
4. Select between the full installer or portable version, based on your preference. The website will highlight which is which.
5. Once downloaded, open Terminal and navigate to the download folder. Run *shasum -a 256 \[filename\]* to get the file’s SHA256 checksum.
6. Compare the output checksum against the one listed on the Apache Friends download page. If they match, the file is verified.

Following these steps ensures you download the right, secure version of XAMPP tailored for your Mac hardware.

## Installing XAMPP on Mac: Step-by-step process

![Installing XAMPP on Mac: Step-by-step process – how to install XAMPP on Mac](https://rolloutready.com/content/images/2026/10/install-xampp-mac-2.webp)

1. Locate the downloaded XAMPP installer (.dmg file) in your Downloads folder and double-click it to open the installer window. You should see a window with the XAMPP icon and an Applications folder shortcut.
2. Drag the XAMPP icon into the Applications folder shortcut. This copies the application to your Mac’s Applications directory. Wait for the copy to complete.
3. Open the Applications folder and double-click the XAMPP app to launch it. If a security warning appears, click **Open** to grant permission.
4. The XAMPP setup wizard will start. Click **Next** to continue through the installation prompts. When asked to select components, keep the default selections including Apache, MySQL, and PHP, unless you have specific needs.
5. Choose the installation directory. The default is usually **/Applications/XAMPP**. This location is recommended for easy access and system compatibility.
6. During installation, you may be prompted to enter your Mac administrator password to allow changes. Enter it to proceed.
7. Once installation is complete, you will see a confirmation message stating the process finished successfully.
8. Launch the XAMPP Control Panel from Applications/XAMPP. Start the Apache and MySQL servers by clicking the respective **Start** buttons. You should see green indicators confirming the services are running.
9. Open your web browser and navigate to **http://localhost**. A XAMPP welcome page confirms the server is working correctly.

## Configuring XAMPP for Mac: Running your first local server

After installation, you need to start the necessary XAMPP services to run your local server. Use the XAMPP Control Panel app on your Mac to manage Apache and MySQL servers.

1. Open the XAMPP Control Panel from your Applications folder. You should see Apache and MySQL listed with start and stop buttons.
2. Click the **Start** button next to *Apache*. When it starts successfully, the indicator light will turn green, and the status changes to "Running".
3. Similarly, click **Start** next to *MySQL*. Wait for the green indicator confirming the database server is running.
4. Open your preferred web browser and enter **http://localhost** in the address bar. You should see the XAMPP welcome page or dashboard confirming the server is active.
5. Locate the **htdocs** folder inside the XAMPP installation directory (usually `/Applications/XAMPP/htdocs`). This is where you place your web files.
6. Save the file and reload **http://localhost/test.php** in your browser. You should see a heading that reads "XAMPP is working!" indicating your PHP server runs correctly.
7. If the page does not load, check your Mac’s firewall or security settings to ensure Apache is allowed to accept incoming connections. Adjust the settings in *System Preferences > Security & Privacy > Firewall* if necessary.

Create a new file named `test.php` inside *htdocs* with the following content:  
  
> <?php  
> echo "<h1>XAMPP is working!</h1>";  
> ?>

Following these steps confirms your local server is configured correctly, allowing you to develop and test PHP applications on your Mac.

## How to install XAMPP on Mac M1 and other Apple Silicon Macs

Apple Silicon Macs use ARM-based architecture, which differs significantly from the Intel x86 architecture traditionally supported by XAMPP. This difference can cause compatibility issues with older XAMPP versions designed solely for Intel chips.

To install XAMPP successfully on M1 or M2 Macs, use the latest XAMPP version that explicitly supports ARM architecture. This version includes native binaries optimized for Apple Silicon, offering better performance and stability.

If an official ARM version is unavailable or causes issues, a common workaround is to run the Intel version under Rosetta 2, Apple's translation layer. While this enables XAMPP to run, expect some performance overhead and occasional compatibility quirks.

1. Download the latest XAMPP installer labeled with Apple Silicon or ARM support from the official Apache Friends site. After launching the installer, you should see installation options without error messages related to architecture.
2. Complete the installation by following the prompts and granting necessary permissions. Successful installation is indicated by the XAMPP Control Panel opening without crashes.
3. Start Apache and MySQL services from the Control Panel. On Apple Silicon, these services should start smoothly with no architecture-related warnings.
4. Test your setup by loading **http://localhost** in your browser. A XAMPP welcome page confirms correct operation on your Apple Silicon Mac.

User reports indicate that native ARM builds of XAMPP run PHP and MySQL noticeably faster on M1/M2 chips compared to Intel versions running under Rosetta. However, some advanced modules or extensions may still lack ARM support, requiring workarounds or waiting for updates.

## Running PHP and installing WordPress on Mac using XAMPP

Once XAMPP is installed and running, you can execute PHP scripts and set up WordPress for local development. Start by creating a MySQL database using phpMyAdmin.

1. Open your browser and go to **http://localhost/phpmyadmin**. You should see the phpMyAdmin interface.
2. Click **Databases** tab, enter a database name (e.g., *wordpress\_db*), and click **Create**. Confirmation will appear that the database was created successfully.
3. Download the latest WordPress package from [wordpress.org](https://wordpress.org/download/?ref=rolloutready.com) and extract it.
4. Copy the extracted WordPress folder into the XAMPP *htdocs* directory (usually `/Applications/XAMPP/htdocs/`). Rename the folder if desired for your local site URL.
5. Navigate to the WordPress folder in your browser at **http://localhost/your-folder-name**. You should see the WordPress setup page.
6. On the setup page, enter the database name created earlier, username **root**, and leave the password blank (default XAMPP MySQL setting). Submit the form.
7. When prompted, create the `wp-config.php` file by clicking the provided button or manually copying `wp-config-sample.php` to `wp-config.php` and updating database credentials.
8. Complete the WordPress installation by providing site title, admin username, and password. Success message confirms WordPress is ready.
9. For managing WordPress files locally, you can use FTP tools like FileZilla configured to connect to the local XAMPP server using *localhost* and default FTP ports if enabled.
10. If you encounter common errors like "Error establishing a database connection," verify database credentials in `wp-config.php` and confirm MySQL service is running in XAMPP.

## Troubleshooting common XAMPP installation issues on Mac

XAMPP installation on Mac can encounter several typical issues that hinder service startup or local server access. Addressing these quickly helps maintain a smooth development environment.

![Troubleshooting common XAMPP installation issues on Mac – how to install XAMPP on Mac](https://rolloutready.com/content/images/2026/10/install-xampp-mac-3.webp)

### Port conflicts with other software

If Apache or MySQL fail to start, a common cause is port conflicts. For example, Skype or pre-installed Apache might occupy port 80 or 3306\. You may see errors like "Apache shutdown unexpectedly" or "MySQL server can't start".

1. Open Terminal and run **sudo lsof -i:80** and **sudo lsof -i:3306** to identify which apps use these ports.
2. Quit or reconfigure those apps to free the ports. For Skype, disable the option "Use port 80 and 443 as alternatives for incoming connections" in its settings.
3. Restart XAMPP, and Apache/MySQL should start without errors.

### Permission errors when starting services

Permission denied messages often appear when XAMPP lacks admin rights.

1. Ensure you launch XAMPP with administrator privileges by right-clicking its icon and selecting "Open as Administrator" or entering your admin password when prompted.
2. If issues persist, check folder permissions for */Applications/XAMPP* and grant read/write access to your user account via Finder's Get Info panel.
3. Restart XAMPP and verify services start correctly.

### MySQL not starting or crashing

MySQL problems may show errors like "MySQL shutdown unexpectedly" or crash logs.

1. Check */Applications/XAMPP/xamppfiles/var/mysql* for corrupted log files.
2. Rename the *mysql/data/mysql\_error.log* file to back it up and try restarting MySQL.
3. If it still fails, reset MySQL data by backing up databases, deleting the *mysql/data* folder, and restoring your backups carefully.

### PHP not executing or showing errors

When PHP scripts don’t run, check that Apache’s config points to the correct PHP module and error reporting is enabled.

1. Open XAMPP’s *httpd.conf* and verify PHP module lines are uncommented.
2. Create a simple *phpinfo.php* file with `<?php phpinfo();?>` in your *htdocs* directory.
3. Access it via `http://localhost/phpinfo.php` to confirm PHP runs.

### Firewall blocking local server access

Firewalls may block incoming connections to Apache or MySQL.

1. Go to **System Preferences > Security & Privacy > Firewall**.
2. Click "Firewall Options" and ensure *httpd* or *xampp-control* is allowed incoming connections.
3. If necessary, temporarily disable the firewall to test access.

Resolving these common issues will help you get XAMPP running smoothly on your Mac.

## Uninstalling or updating XAMPP on Mac safely

Before uninstalling or updating XAMPP, back up your data to avoid loss. This includes your databases and the **htdocs** folder where your web files reside. Use phpMyAdmin or the terminal to export databases, and copy */Applications/XAMPP/xamppfiles/htdocs* to a safe location.

To back up databases, open phpMyAdmin via *http://localhost/phpmyadmin*, select each database, and use the Export tab to save SQL files. Alternatively, run `mysqldump -u root -p database_name > backup.sql` in Terminal for each database.

1. Quit all XAMPP services using the XAMPP Control Panel. You should see all services stopped.
2. Drag the */Applications/XAMPP* folder to the Trash. This removes the core installation.
3. Empty the Trash to complete uninstallation; XAMPP is fully removed.

When updating, download the latest installer matching your Mac’s architecture from the official site. Run the installer; it will prompt about overwriting existing files—choose to keep your existing *htdocs* and *mysql/data* folders if prompted. If no prompt appears, manually restore backed-up folders after installation.

For example, after updating, restore your databases by importing the SQL files via phpMyAdmin or using `mysql -u root -p database_name < backup.sql` in Terminal. Copy your saved *htdocs* files back to */Applications/XAMPP/xamppfiles/htdocs*.

Be cautious: overwriting the entire XAMPP folder without backups can erase your sites and databases. Always back up before uninstalling or upgrading to safeguard your local development environment.

## More on this topic

- [How to Install Node.js with NVM on Mac: A Clear Step-by-Step Guide](https://rolloutready.com/install-nodejs-nvm-mac/)
- [How to Install MongoDB on Mac: A Clear Step-by-Step Guide](https://rolloutready.com/install-mongodb-mac-step-by-step/)
- [How to Install and Use SQLite Browser on Mac: A Practical Guide](https://rolloutready.com/install-sqlite-browser-mac/)
- [How to Install Python on Mac: A Clear Step-by-Step Guide](https://rolloutready.com/install-python-mac/)

## Frequently asked questions

### How to install xampp in laptop?

Installing XAMPP on a laptop depends on the operating system. For Windows or Mac laptops, download the appropriate installer from the official Apache Friends website, then run the installer and follow the prompts to complete the setup. Make sure to allow necessary permissions during installation and verify that ports 80 and 443 are free to avoid conflicts.

### How to install xampp in linux?

To install XAMPP on Linux, first download the Linux version from the Apache Friends website. Make the installer executable using *chmod +x*, then run it with superuser privileges using *sudo./xampp-installer.run*. After installation, use the *sudo /opt/lampp/lampp start* command to launch the server, and manage it with commands like *stop* and *restart*.

### How to install xampp on macbook?

On a MacBook, download the Mac version of XAMPP from the official site. Open the downloaded DMG file and drag the XAMPP folder into your Applications directory. Launch the XAMPP Control Panel from Applications, then start Apache and MySQL servers. Grant any requested permissions, especially if you run macOS security prompts.

### How to install xampp on macbook pro?

The installation process for MacBook Pro is identical to other Mac models. Download the Mac installer from Apache Friends, open the DMG file, and copy XAMPP to Applications. Use the XAMPP Control Panel to start services. If your MacBook Pro has Apple Silicon, verify compatibility or follow Apple Silicon-specific steps to ensure smooth operation.

### How to install xampp on mac m4?

Currently, XAMPP does not officially support Apple Silicon M4 chips directly. You can try installing the Intel version via Rosetta 2 translation, but performance may vary. Alternatively, consider using native ARM-compatible server stacks or wait for official updates from Apache Friends supporting M4 architecture.

## What this guide does not cover

This guide does not cover using XAMPP in production environments; it is intended for local development only. If you plan to deploy your projects live or require advanced server security, consider dedicated production-grade solutions. Some advanced configurations or troubleshooting might require command-line knowledge beyond the scope of this article, such as custom Apache modules or in-depth PHP.ini modifications.

The most useful next step is to start a simple PHP project or install WordPress locally using the XAMPP control panel. Open the "htdocs" folder inside your XAMPP installation directory and place your project files there. Then, launch Apache and MySQL from the XAMPP Control Panel, and navigate to **http://localhost** in your browser to verify your local server is running. This hands-on approach helps solidify your understanding of how XAMPP works on your Mac.