There are many package available out there to setup your local web server like XAMPP, WAMP and EasyPHP. All you need in the package is Apache, PHP 5.4 or latest, MySQL database and PhpMyAdmin.
Here, we show you how to setup your local web server using XAMPP on Window.
- Download the latest XAMPP for Window at https://www.apachefriends.org/index.html
- Start the installation process by double-clicking on the XAMPP installer. Click ‘Next’ after the splash screen.
Here, you can select the components you want to install. Choose the default selection and click ‘Next’.
Choose the folder you want to install XAMPP in. This folder will hold all your web application files, so make sure to select a drive that has plenty of space.
The next screen is a promo for BitNami, an app store for server software. Deselect the ‘Learn more about BitNami for XAMPP’ checkbox, unless you actually enjoy receiving promo mails!
- Setup is now ready to install XAMPP. Click Next and wait for the installer to unpack and install selected components. This may take a few minutes. You may be asked to approve Firewall access to certain components (such as Apache) during the installation process.
- Installation is now complete! Select the ‘Do you want to start the Control Panel now?’ checkbox to open the XAMPP control panel.
Testing Your XAMPP Installation
Follow these steps to test your XAMPP installation by launching the Apache web server and creating a simple PHP file.
- In the XAMPP control panel, click on ‘Start’ under ‘Actions’ for the Apache and MySQL module. This instructs XAMPP to start the Apache webserver and MySQL database.
- Open your web browser and type in: http://localhost or http://127.0.0.1
- You should see the following screen. This means you’ve successfully installed XAMPP on your computer.
- We will now test whether XAMPP has installed PHP successfully. To do this, fire up Notepad and type the following into a new document:<?php
echo ‘Hello world’;
- Save this file as ‘test.php’ in c:\xampp\htdocs\ (or whichever directory you installed XAMPP in)
- Navigate to localhost/test.php. You should see the “Hello World” message:
Congratulations! You have now successfully installed XAMPP on your PC. You can now use your local Apache webserver to install our scripts.