Install and run XAMPP on Windows and Linux

In this basic tutorial, you will learn how to install XAMPP. XAMPP is used to run Apache HTTP Server, MySQL database, and interprets scripts written in the PHP. It is a great tool to test or host a website on your own machine. Lets see how install and start it.

  1. Download and Install.
    • Install for Windows here
    • Linux (Knoppix mainly) Installation here and Please follow that guide only if you are Linux User.
  2. Now run the program.
  3. The control panel will open. You need to start the Apache and MySQL services and make sure that they are green.

xampp

 

Now, all you need to do is the browse to the installation folder of XAMPP and get to the htdocs folder. Assuming you installed XAMPP in c:\ then look for the following path.

C:\xampp\htdocs

Now make a folder named mywebsite inside the htdocs folder and inside it, make a file named index.php like this.

C:\xampp\htdocs\mywebsite\index.php

Open and edit the index.php file and add the following code.

Now, go to your browser, and visit one of the following links.

If you see the message in the above code. then you have not only installed XAMPP but you are now able to work with PHP.