How to install PHP

Before starting with PHP, it’s important that you are aware of how to install PHP on your local system, so you can start coding right away.

The installation needs setting up the web server first. For that, you need to download the latest version of XAMMP here.

Note that, XAMPP is a package that includes the Apache web server, MySQL, PHP, Perl, a FTP server and phpMyAdmin.

Install it straightaway as any other software.


Once installed, Go to Start and type ‘XAMPP Control Panel‘,

Install PHP

Click on the item in the program list, you will see the below window popping up:

XAMMP Control Panel

Now you just need to start the Apache Server and MySQL Server (click on their corresponding ‘Start’ buttons), and you are ready to go.

Hit http://localhost/ on your browser. If you can see the XAMPP homepage, Bingo! That means everything went perfect until now.

Create a new project root directory (lets name it as jcombat) at the XAMMP installation location (For me it’s C:\Program Files\xampp\htdocs) , and start creating your project specific PHP files into that directory. When we run any of these PHP files, they are directly parsed and executed by the PHP parser engine on the Apache web server.

Create Project Directory in XAMPP

So now we can run our project by hitting the following URL from my local system:

http://localhost/jcombat

I hope you might already be aware that when we hit the URL http://localhost/jcombat, the server first looks for a file named as ‘index‘ in the /jcombat directory, with index.html having a higher priority than index.php

Receive our updates to your inbox

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.