You can read below about how to install XAMPP/MAMP on macOS, methods compatible with macOS and allowing WordPress to be installed.
Install XAMPP on macOS
1) Download image of XAMPP
In order to install XAMPP, we must first download its image, and this is done from the official website. Download the XAMPP image for OS X
2) Installing the downloaded XAMPP image
If is shown the error “xampp-osx-8.2.0-0-installer” cannot be opened because the developer cannot be verified.”, go to System Settings -> Privacy & Security, and at the bottom you will find the Open Anyway option.

Enter the password and the installation will start shortly.


Upon completion of this process, the following window will be displayed.

Apache Web Server will start immediately, and a window with the welcome message will open in the browser.

And at the same time, the XAMPP administration panel will remain open.

3) Starting the MySQL server
To be able to start the MySQL server, from the XAMPP administration panel, go to the “Manage Servers” tab, where you select “MySQL Database” and press the “Start” button.

4) Accessing the MySQL database
To access the MySQL database, go to the XAMPP administration panel and press the “Go to Application” button.

As soon as the window with the welcome message re-opens in the browser, click on “phpMyAdmin” at the top.

PhpMyAmin will immediately open, the area where you can manage the database.

Hint: The same thing can be done by accessing “http://localhost/phpmyadmin/” in the browser.
5) Locate the “htdocs” directory
To locate the “htdocs” directory, go to the XAMPP admin panel and click on the “Open Application Folder” button.

The “Finder” will open with several directories and files, including “htdocs”, the directory from which PHP runs.

6) The URL that accesses the “htdocs” directory
To access the files added to the “htdocs” directory, open the url “http://localhost/” in the browser, followed by the name of the created file.
Ex: http://localhost/wordpress
Any of the methods used to install XAMPP/MAMP on macOS, you will get the same result, a Web server with PHP and MySQL.
Installing MAMP on macOS
1) Download the MAMP image
To be able to install MAMP, we must initially download its image, and this is done from the official website. Download MAMP image for OS
2) Installing the downloaded MAMP image
Upon completion of this process, the following window will be displayed.

3) Starting the MAMP server
Access macOC applications or press the “F4” key, then go to the last page where there is MAMP and MAMP Pro. I recommend opening the MAMP application if you want for free, and for more advanced things you can use MAMP Pro. To install and use WordPress locally, simple MAMP is sufficient.

Apache Web Server will start immediately, and a window with the welcome message will open in the browser.

And at the same time, the MAMP administration panel will remain open.

4) Accessing the MySQL database
To access the MySQL database, go to the MAMP administration panel and click on the “WebStart” button.

As soon as the window with the welcome message re-opens in the browser, click on “Tools” -> “phpMyAdmin” at the top.

PhpMyAmin will immediately open, the area where you can manage the database.

Hint: The same thing can be done by accessing “http://localhost:8888/phpMyAdmin/” in the browser.
5) Locate “htdocs” directory
The MAMP admin panel will show you where the “htdocs” directory is located. It can be found in Applications -> MAMP.

To get to the “Applications” directory, open “Finder”, and on the left side you will find the shortcut to it. In the main part of the window, all applications are displayed, including the “MAMP” directory. And inside it, you will find the desired “htdocs” directory.

6) The URL that accesses the “htdocs” directory
To access the files added to the “htdocs” directory, open the url “http://localhost:8888/” in the browser, followed by the name of the created file.
Ex: http://localhost:8888/wordpress
This ends the long article about how to install XAMPP/MAMP on macOS.
If you have encountered problems, do not hesitate to contact us or write in the comments section below.
To read about installing XAMP/MAMP/WAMP on Windows, you can read this article.