How to Install XAMPP on MacOS. Introduction XAMPP is a free and open-source, cross-platform web server solution stack which is developed by Apache Friends. XAMPP supports most of the operating systems including Windows, MacOS and Ubuntu. How do I install XAMPP for Mac OS X? To install XAMPP, follow these steps: Open the DMG-Image. Double-click the image to start the installation process. XAMPP is now installed below the /Applications/XAMPP directory. Does XAMPP include MySQL or MariaDB? Us/pacific to utc. Since XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. Download the latest version for your platform (Linux, Windows, Mac OS X, or Solaris) from apachefriends. Run the executable to extract it (you can extract it straight to C: if you want; it'll create an XAMPP subfolder and put all the files there) and answer the questions setup will ask you. Rename the folder to XAMPP. Select the XAMPP components which are all you want to install in your MAC; After clicking the Next button,XAMPP will install to your Application Folder. Open the bitnami link in a new window. There you can find free installer for wordpress, Joomla, Moodle, Magento, Drupal, etc Which tends you to install these things over your XAMPP.
Setup a development environment with free and open source web server solution stack (XAMPP) and Database management software (phpMyAdmin)
XAMPP and phpMyAdmin as localhost provides a local server for developers to test and build web apps. XAMPP is a local server that is installed on personal computers/laptops. It provides a local environment to create, run, and test PHP applications before deploying them on live servers.
We will cover following sections in this blog post:
XAMPP is free and open source web server solution stack. It contains Apache, MySQL, MariaDB, PHP, and Perl. XAMPP is available for Windows operating systems. It is extremely easy to install and use. That’s why it’s the most popular PHP development environment. XAMPP and phpMyAdmin as localhost provides a complete environment for web app development and testing.
Alphabets in XAMPP stand for:
- X — cross-platform (supports multiple operating systems including Linux, Windows and Mac OS)
- A — Apache HTTP Server
- M — MariaDB (Database)
- P — PHP
- P — PERL
- Download XAMPP from here.
- Install the executable file.
- Then click “Next”.
- Choose the components you want to install.
- For most web apps you only need Apache, MySQL, PHP, and phpMyAdmin.
- Select the installation directory where you want to install XAMPP.
- You will be shown a windows security alert. You must check the following option: “Private networks, such as my home or work network”.
- Finally click on “Finish” to complete installation.
- After successful installation, open XAMPP control panel.
- Start “Apache” and “MySQL” services.
To access phpMyAdmin dashboard, click on “Admin” button next to MySQL service. You can also access phpMyAdmin by visiting http://localhost/phpmyadmin from your browser. Here you can create databases. Follow these steps to create a new database.
- From dashboard, click on “Databases” tab.
- Enter database name and click on “Create” button. This will simply create a new empty database.
- Next you can create tables by selecting the newly created database.
- Enter table name under “Create Table”.
- Select number of columns.
- Then click on “Go” button.
- After that you need to fill the form on next page to finish creating table.
XAMPP installation is simple and straight forward. It takes no more than 15 minutes to the setup XAMPP server. Once it’s installed, developers can build and test their PHP based web apps even without an internet connection. Instead of testing projects directly on a live web server, it’s simple and time-saving to test them locally. It’s a great platform for beginners to learn, test, and polish their PHP, Perl, and database skills.
One of the more advanced topics of setting up you local development environment on your Mac, especially when using third-party software like Xampp, is to set up Virtual Hosts.
Virtual Hosts allow you to create your own url (within the browser) and point it to your local directory on your hard drive. This means, instead of pointing to
http://localhost , you can create a custom url such as
Step 1: Editing our /etc/hosts file
Setup Xampp On Mac Download
The first thing we’ll need to do is to set up our
/etc/hosts file. This is a hidden file that we’ll use to edit our custom url and point it to our local machine.
First we’ll have to open up Terminal (Use Spotlight search and search for Terminal and open it). Then inside Terminal we’ll type in:
You’ll be asked to type in your password. Just type in your log in password to your computer.
Then you should see something like this:
Scroll down by pressing the down arrow key all the way to the bottom and add this to a new line:
Note: Feel free to edit the name of the url. I like to add
.local to the end of my custom urls so that I know I’m viewing my local files.
It should now look like this:
control + x and then type
y to save your changes. Then press
Enter to write out your changes.
Step 2: Editing Xampp’s httpd.conf file
Now we’ll need go into our XAMPP folder and edit a few things. Open up
/Applications/XAMPP/xamppfiles/etc/httpd.conf file in any text editor (I use Sublime Text 2).
Somewhere around line 487, you should see something like this:
Just remove the
# from the Include line like so:
Save the file and close it.
Step 3: Editing Xampp’s httpd-vhosts.conf file
Now that we have included the httpd-vhosts.conf file from the previous step, we’ll go in and edit that file to include our new project url.
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf file in your text editor.
You should see something like this:
You’ll notice that Xampp has provided a structure for a test example Virtual Host. We’ll create our own similar version.
On a new line add this to the end of the file:
You’ll notice that for the Servername I included the name of the url we had typed inside of our
/etc/hosts file from Step 1.
The DocumentRoot and Directory values point to a folder directory where I have my local files set up at. Don’t forget to change the path to point to your folder directory.
Step 4: Testing your local site
Now you just have to restart your Apache server in Xampp’s Application Manager and test out your new url in a web browser. Just type in
myprojecturl.local (or whatever you named it) into your browser url bar and you should see your site up and running.
Install Xampp On Mac Mojave
Now you know how to set up Virtual Hosts for Xampp. Don’t forget, every time you edit the
/etc/hosts file, the
httpd.conf file, or the
httpd-vhosts.conf file, you need to restart your Apache server for Xampp.
Install Xampp On Mac M1
If you have any questions, feel free to comment below.