XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use. 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. It stands for Cross-Platform (X), Apache, MySQL, MariaDB, PHP and Perl which are also the main components of the stack package.
XAMPP is a free distribution package that makes it easy to install Apache Web Server, PHP, PEAR, and MySQL. Before installing XAMPP, you should turn off any other web servers and instances of MySQL you have running on your Mac.
XAMPP is a free distribution package that makes it easy to install Apache Web Server, PHP, PEAR, and MySQL. Before installing XAMPP, you should turn off any other web servers and instances of MySQL you have running on your Mac.
Installing XAMPP on a Mac
![Xampp for mac high sierra Xampp for mac high sierra](/uploads/1/1/8/7/118779467/197491193.png)
- Download XAMPP for Mac OSX - Be sure to select the proper version of PHP. For Webucator classes, any version after 5 will be fine.
- Open the downloaded file (the DMG-Image).
- Drag and drop the XAMPP folder into your Applications folder.
Starting XAMPP on OSX
To start XAMPP simply open XAMPP Control (by going to /Applications/XAMPP/manager-osx.app in Finder) and start Apache and MySQL on the Manage Servers tab.
Xampp For Macos Catalina
If MySQL Does Not Start
If your MySQL server isn't starting, you may need to set the permissions for it using Terminal with this command:
Testing your OSX XAMPP Installation
In your web browser, go to http://localhost. You should see the start page of XAMPP:
Class File Permissions
- Cmd+click on the ApplicationsXAMPPxamppfileshtdocs folder and select 'Get Info'.
- If the lock symbol at the bottom indicates that this information is locked, click the lock icon to unlock, and enter your user credentials.
- Once the settings are unlocked, choose 'everyone' under 'Sharing & Permissions' and change the option to 'Read & Write'.
Class Files
- Download the class files.
- After downloading the class files, navigate to ApplicationsXAMPPxamppfileshtdocs and create a new folder named Webucator and extract your class files in that folder.
Setting the MySQL Password on Macs
- The PHP files use 'pwdpwd' for the MySQL root password, while the default password is NO password.
- Change the password to pwdpwd by opening Terminal (Applications > Utilities > Terminal) and enter:
You will be asked to enter your Mac password; enter it and press enter. Then you will be asked if you want to set a password for your XAMPP pages, then for MySQL, and then for MySQL/phpMyAdmin user...to all of these just type 'n' for no and press enter.
Then it will say:
- Enter 'y' for 'yes, let me set a password for the root user' and press Enter
- Enter the password pwdpwd. You will be asked to enter it again for confirmation.
- Quit Terminal (Cmd+Q) and restart Apache and MySQL using the XAMPP Control Panel.
Testing phpMyAdmin
- Go to http://localhost
- Click on phpMyAdmin under Tools
- Enter 'root' for username
- Enter 'pwdpwd' for password
You should be able to get in.
Installing Northwind Database using XAMPP
NOTE: you should download the class files below before following these instructions, as it contains the Northwinds Database file(s).
Xampp For Windows 64 Bit Windows 10
- To install the Northwind database used in class, click on the 'phpMyAdmin' link on the left navigation bar of the XAMPP home page. That should take you to http://localhost/phpmyadmin.
- If it asks you to login, the username is root and the password is blank (unless you have already changed it to something else, like pwdpwd).
- On that page, click on the Import link under the Localhost heading.
- Browse to the Northwind-MySQL.sql file in your class files.
- Click the Go button on the bottom right of the page.
- You should get a Success message and Northwind should be added to the Database dropdown menu on the upper left of the page.
Recommended Editor
- Visual Studio Code ( Download, Install, and Set up)
- While you may use a different editor or IDE, Visual Studio Code is an excellent IDE to learn to code on. It provides a nice balance of power and simplicity and it is available on Windows and Mac.
Designate your testing server in Dreamweaver
NOTE: The following only applies if you are using Dreamweaver. If you are not, please ignore this section.
- Go to Site > New Site.
- In the Site Setup dialog, fill in the Site Name (e.g., PHP) and browse to the Local Site Folder (e.g., ApplicationsXAMPPxamppfileshtdocs).
- Choose the Servers tab.
- At the bottom of the box on the right, click +.
- On the Basic tab, provide a Server Name, set Connect using to Local/Network, ensure the Server Folder matches the local site folder you specified in step 2, and set the Web URL to http://localhost/Webucator/ClassFiles/.
- Click the Advanced button.
- In the Server Model field, select PHP MySQL.
- Click Save. The server should appear in the table on the Servers tab.
- Make sure that both the Remote and Testing checkboxes are checked.
- Click Save.
Testing PHP Files
All your class files should be located in ApplicationsXAMPPxamppfileshtdocsWebucatorClassFiles
2 Methods for Testing Files in Browser
To test any of the class files in your browser, say ApplicationsXAMPPxamppfileshtdocsWebucatorClassFilesPHPBasicsDemosHelloWorld.php, you can use 1 of 2 methods:
Method 1:
- Go to http://localhost/Webucator/ClassFiles/PHPBasics/Demos/HelloWorld.php in your web browser.
- Follow the same pattern to view all other class files; basically the ApplicationsXAMPPxamppfileshtdocs gets changed to http://localhost/
Method 2:
- Go to http://localhost/Webucator/ClassFiles/ in your web browser.
- Bookmark that page in your browser for easy access to it from now on.
- From there, you can see all the lesson folders and drill down to any class file for testing/viewing
And that's it
Happy Mac XAMPPing!
What is XAMPP?
XAMPP is one of the most popular PHP development environment
XAMPP is a completely free, easy to install Apache distribution containing MariaDB, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and to use.
Here’s a breakdown of the four components of XAMPP:
- Linux: an operating system
- Apache: an open source web server
- MariaDB: One of the most popular database servers. Made by the original developers of MySQL. Guaranteed to stay open source.
- PHP: server-side scripting language (which WordPress sites run on)
- Perl: a highly capable, feature-rich programming language with over 30 years of development.
When these components come together, they create a local web server on your computer. Which means you can build entire websites and see what they would look like online without being connected to the Internet.
Basically, XAMPP allows you to run a WordPress site on your computer, which is why XAMPP is awesome for testing out new features on your existing site, making bigger changes, or building an entire site from scratch. (If you’d like to learn more about local development, click here)
Step 1: Download XAMPP
Head over to the downloads page of the XAMPP. Scroll down to section for OS X and click on the blueDownload (64-bit) button.
I would suggest if you could download one of versions highlighted in the image above which says “7.2.X / PHP 7.2.X” or “7.3.X / PHP 7.3.X” and not the XAMPP-VM ones.
Step 2: Install XAMPP on Your Mac
XAMPP should start downloading automatically. It can take a few minutes to download. When it’s finished, click on the downloaded file and a typical installation box will appear. Double click on the XAMPP icon to begin the installation.
Follow through the installation process
Step 3: Launching XAMPP
There are two ways to launch XAMPP:
- Go into your Applications folder (where XAMPP should have been saved in the previous step) and click the XAMPP folder.
Once inside, you should see folder contents that looks similar to the image below.
Double click on the white icon which says “manager-osx”, and you’ll see this box appear:
Step 4: Run the Servers
Now, click on the Manage Servers tab option in the XAMPP app.
Now to run the Apache & MySQL servers, either click on the white button in the bottom which says Start All or if you would like to start them up individually click on the white button on the right which says Start.
It can take a few seconds for the servers to run. You would see your app as seen in the image below.
Once, the servers are up you would see the status change to Running and the color of the circle to the left to green.
Voila, just type “localhost” in your favourite web browser to see a static page as show in the image below.