Back

Installing a Local Dev Environment on Mac and Windows

XAMPP is Ideal for a Local Dev Environment

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.

Installing 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: Run the installer to set up 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.

Installing 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: 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.

Rate this post

Dev Noob
Dev Noob