How to install PHP in the local system and execute PHP file, Install XAMPP

Install PHP in local system
Written by Gupta

Install PHP and XAMPP

In the previous tutorial, we learned what is PHP? Why do we need to learn PHP? In today’s tutorial, I am going to teach you how to install XAMPP or PHP in the local system to execute PHP files? Install PHP

We all know that PHP is a server-side scripting language that’s why we need a server to execute PHP files. All developers install Apache server on their computer to execute PHP. Here, we will install the Apache server and MySQL database also.

Nowadays, most of the server supports PHP such as Apache, Ngnix, IIS server, and many more. To execute PHP files on the IIS server, you have to do some extra configuration because the IIS server designed and developed for .NET technologies.

How to install XAMPP or PHP in local system? Install PHP:

There are two different method to install PHP in local system and execute PHP files:

  1. Download setup files from the official website of PHP, install, and configure it into the local system.
  2. Download any one of the packages and execute PHP files
    • XAMPP (X-OS, Apache, MariaDB(Mysql), PHP, Perl)
    • WAMP (Windows)
    • LAMP (Linux)
    • MAMP (Mac)
    • SAMP (Solaris)
    • FAMP (FreeBSD)

Most of the developers use XAMPP package to execute PHP files locally because this package provides various tools at one place such as Apache server, MySQL database, FileZilla FTP etc.

Let me tell you first what is package because many people don’t know what is package and why XAMPP is said to be package? After that, I will describe you installation process of XAMPP.

What is Package?

A package is a collection of multiple applications and code modules that work together to meet various goals and objectives. Here, XAMPP is a package because it contains multiple applications and code modules such as Apache server, MySQL database, etc.

Let’s see an example of a package in real life. When you go to the market and purchase many things and keep that thing in a basket or a bag and the process of keeping things in a bag or basket is called packaging.

Why should we install XAMPP?

XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. It stands for X-OS Apache MySQL PHP and Perl. X-OS means it is supportable in any operating system. We should install XAMPP because of following reasons:

  1. It is available for every operating system.
  2. Every company install into their working system.
  3. Every institute use this package to teach PHP to their students .
  4. It is freely available.
  5. It has PHP and Perl both.

Install XAMPP on local system (Windows) – Install PHP

Let’s see complete steps to install XAMPP in local system. Here, I am using Windows operating system.

Step 1: First of all, download the XAMPP package from their official website. (Click here for official website)

Step 2: Download XAMPP according to your operating system.

Download XAMPP
Download XAMPP

Step 3: Next, open download folder or that folder where your XAMPP package downloaded and double click on the XAMPP exe file. Click on the Next button on the opened pop-up box.

XAMPP installing start
XAMPP installing start

Step 4: Again, a pop-up box will be opened. In this pop-up box, you will select components which you want to install but I recommend you to select all component. After that, click on the Next button.

Select all components
Select all components

Step 5: Now, select your folder or drive where you want to install XAMPP. You can install this package in any drive such as C, D, or E. After selecting the drive, click on the Next button.

Select destination folder for install XAMPP
Select destination folder for install XAMPP

Step 6: Again click on Next button in next pop-up.

XAMPP installation process
XAMPP installation process

Step 7: Now, your XAMPP is ready to install. Click on the Next button for further installation.

XAMPP installing process
XAMPP installing process

Step 8: After complete installation, a pop-up box will be opened which has a Finish button. Click on that button to finish the installation.

Step 9: Next, select your preferred language.

Select preferred language
Select preferred language

Step 10: Now XAMPP is ready to use. To run a PHP program and MySQL database click on the start button in front of Apache and MySQL.

XAMPP start
XAMPP start

Step 11: If both are started successfully then the start button will replace with the stop button otherwise it will show an error.

XAMPP complete started
XAMPP complete started

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.