How to Install PHP XAMPP

Hello, everyone welcomes back to new post in PHP tutorials. In the previous lecture, you had learned Introduction to PHP and we told you that we will study how to install PHP in next tutorial. So, today in this tutorial we will tell you how to install PHP XAMPP in your System. First of all my request to you is that if you have not seen the previous lecture, please have a look at that first and then continue with this chapter.

As you know PHP is server-side scripting language and it runs only on a server. If you don’t have any hosting and you are beginner then you may practice on Local Server also we said sometimes localhost.

[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | PHP – Datatypes [/su_note]


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

Many PHP developers like to build their websites and test on local servers before publishing to the real server. To build a local web server environment on Windows computers, you can use XAMMP for Windows. In this guide, we will introduce the great free tool XAMPP which is developed by Apache Friend, now the most popular PHP development environment for Windows, Mac OS X & Linux. XAMPP is a completely free, easy to install Apache distribution containing MySQL, PHP, and Perl. The XAMPP open source package has been set up to be incredibly easy to install and use. Check out below instructions, see how to install XAMPP on Windows computers.

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

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

[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | Variable and its Scope in PHP [/su_note]

How to Install XAMPP on Windows PC?

Why use XAMPP for Windows?

  • The most popular PHP dev package
  • For Windows 10, 8, 7, Vista, XP
  • Containing MySQL, PHP, and Perl
  • Easy installation and configuration
  • Completely free of charge

We will break down into details of each step with screenshots and references. If you want to create a local server environment for testing websites before uploading to a web hosting account, check out the easy steps below.

Install XAMPP for Windows

Step 1: Download the appropriate Version of XAMPP

XAMPP comes with the different version for Windows, Mac, and Linux. Click on Download, and download the XAMPP 7.2.1 (with PHP 7.2) for windows, if you are using any of the window other than Window 2003& XP.

Install PHP XAMPP Tekraze

But if you are window 2003 or XP user Download the XAMPP 1.8.3 (with PHP 5.5), Since the latest version doesn’t support Window 2003 or Window XP.

Note: If you need XAMPP for WordPresss, the latest WordPress 4.9.2 requires PHP version 5.2.4 or greater. So both XAMPP for Windows 5.5.33 and XAMPP for Windows V 5.6.9 will work with the latest WordPress.

[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | BackEnd Technologies you need to know [/su_note]

Step 2: Run the XAMPP setup wizard

Double click on the downloaded file and run the setup wizard. You will see a welcome screen, Click Next to Proceed

Install PHP XAMPP Tekraze

Step 3: Select the components

The installation of XAMPP for Windows is very straightforward, just like you install any other Windows applications. Install PHP XAMPP Tekraze

Apache and PHP are marked Grey, they are essential to run XAMPP local Apache server on your PC, so you can’t disable them. Other options are optional.

Make sure that you select the MySQL server and PhpMyAdmin in the XAMPP components selecting screen or you can select all options in the list.

Why do we require MySQL and phpMyAdmin?

Since most CMS or dynamic websites requires a MySQL database, so we have to enable MySQL. XAMPP offers phpMyAdmin, the free tool to manage MySQL databases. When you select and install MySQL database in the custom installation of XAMPP on Windows computer, so will the phpMyAdmin be installed.

Step 4: Select the Installation Directory

XAMPP files will be saved to a directory on your hard disk with the websites included. You will have the option to select an existing folder or create a new folder to save all XAMPP files.

Install PHP XAMPP Tekraze

Click Next and your local Apache server with PHP support, MySQL server with phpMyAdmin tool has been set up.

Congratulations, you have successfully installed XAMPP on a Windows PC. You can go to building your websites and host them on your local XAMPP server now.

[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | Develop mobile apps in PHP [/su_note]

Bonus Step: Create MySQL Database in XAMPP

Start up XAMPP, you will open the XAMPP control panel as below. Click to start both Apache and MySQL. We are now going to create the MySQL database for the local web applications installed on Windows, such as local WordPress site setup, local Joomla site setup, etc.

Install PHP XAMPP Tekraze

 Now open your Browser and type localhost/phpmyadmin, admin panel is in front of you, here you can create your database. Click on new to create new database shown in below screenshot:

Install PHP XAMPP Tekraze


So this is for today, in our next tutorial we will learn about variable scopes in PHP and Data Types in PHP. Stay connected with us for more tutorials.

[su_note note_color=”#f5f5d4″ radius=”6″]| Also Read | BackEnd vs FrontEnd difference you need to know [/su_note]

If you like this tutorial please share it with your friends, colleagues and with your relatives, keep visiting and be a part of the Tekraze family. If you have any problem with this tutorial please comment in the comment box and if you have any suggestion regarding this then please tell us.

Content Protection by

UX /UI designer who loves clean, simple & unique design. i also enjoy crafting brand identities, icons, & ilustration work.

An Graduate Student of Information Technology, Guru Jambheshwar University of Science & Technology, Hisar. Love to discover new things about tech and loves to design.
Expertise in Graphic Designing with photoshop CS6 and CC. Also a little bit command over GIMP and CorelDRAW. I also have a knowledge of C, C++, Core Java, HTML5, CSS3, Bootstrap4, JavaScript and PHP. In free time i love to play cricket ,watch web series and love to travel.

Articles: 25


  1. I have installed the XAMPP successfully. But in control panel while starting the MySQL following error occur.
    Error: MySQL shutdown unexpectedly.
    [mysql] This may be due to a blocked port, missing dependencies,
    [mysql] improper privileges, a crash, or a shutdown by another method.
    please help me to resolve this problem.

Leave a Reply

Your email address will not be published. Required fields are marked *