Site icon Webdev Tutorials, for Noobs

How to Install XAMPP: Set Up a Local Development Environment

TL;DR: How to Install XAMPP

This guide covers how to install XAMPP on both Windows and Mac and get your local development environment up and running in minutes.

1. Installation

2. Setting Up the Services

3. Testing the Server

This is how you run PHP on localhost — simply place your file in htdocs and access it via your browser.

Pro Tip: Apache Port 80 Conflict Fix

If Apache fails to start, it’s often because another program (like Skype or VMware) is using Port 80. You can change this in the Apache httpd.conf file or close the conflicting app.

Why XAMPP Is the Best Local Development Environment for Beginners

XAMPP is a cross-platform solution and distribution of Apache which contains MySQL, Perl, PHP, and Python sectors. It is a conglomeration of LAMP, WAMP, and MAMP that aids in developing PHP web applications, including the phpMyAdmin module.

As an open-source distribution of Apache containing Perl, MariaDB, and PHP, XAMPP is a web server used to pre-test and pre-allocate resources for a project before deployment. While it is a cross-platform server, it is often noted to perform best with Windows.

Also Read:
How to Set Up Visual Studio Code for Web Development

How to Install XAMPP using Windows

The procedure for XAMPP requires some manual routing and copy-pasting. Follow these steps:

  1. Download: Get the latest Windows version of XAMPP from the Apache Friends website.
  2. Install XAMPP: Run the installer to install XAMPP on your computer.
  3. Launch: Open the XAMPP Control Panel once installation is complete.
  4. Start Modules: Click the Start buttons next to the Apache and MySQL modules.
  5. Access Directory: Click the Explorer button in the Control Panel to open the installation directory.
  6. Navigate to Root: Go to the htdocs folder, which is the default root directory for XAMPP web servers.
  7. Create Project: Create a new folder inside htdocs to serve as your project’s root directory.
  8. Add Files: Copy your project’s PHP files into this new folder.
  9. View Project: Open a web browser and enter localhost. Click the link for your project folder to access your work.

How to Install XAMPP using Mac/OSX

The process is similar to Windows, but involves a .dmg file that must be handled correctly.

  1. Download: Get the latest OSX/Mac version of XAMPP from the Apache Friends website.
  2. Install XAMPP: Open the .dmg (disk image) file and run the installer. Follow the OSX instructions to complete the setup.
  3. Launch: Open the XAMPP Control Panel.
  4. Start Modules: Click the Start buttons for both Apache and MySQL.
  5. Mount Disk: Click the Volumes button in the Control Panel and select Mount next to your XAMPP disk image.
  6. Access Directory: Click on Explorer in the Control Panel to open the installation directory.
  7. Navigate to Root: Locate the htdocs folder, the default web root directory.
  8. Create Project: Create a new folder in htdocs for your PHP project.
  9. Add Files: Copy your PHP files into that folder.
  10. View Project: Enter localhost in your web browser and select your project folder.

Why Use XAMPP?

XAMPP is popular because it handles every basic requirement of a development environment needed for PHP web development. It allows beginners and learners to start their PHP journey with relative ease and comfort. You can easily install xampp by following above instructions.

Rate this post

Exit mobile version