Install PHP on Windows (Apache & MySQL) XAMPP

Updated: April 5th, 2022, 05:56:25 IST
Published: August 28th, 2021
Install PHP on Windows (Apache & MySQL) XAMPP
Title: Install PHP on Windows (Apache & MySQL) XAMPP

To get started with PHP installation, you should Install a web server on your own PC, and then install PHP and MySQL.

To start using PHP, you can install AMP (Apache - A web server, MySQL, PHP). Here is some list of popular web server, you need to have install on your PC or Laptop, before installing PHP and MySql:

  • XAMPP (Cross, Apache, MySQL, PHP, Perl) for Cross Platform: It includes some other components too such as FileZilla, OpenSSL, Webalizer, Mercury Mail, etc.
  • WAMP for Windows
  • LAMP for Linux
  • MAMP for Mac
  • SAMP for Solaris
  • FAMP for FreeBSD

I would recommend you to install Apache Xampp. It’s 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 means it already has inbuilt PHP and MySQL, you will not need to worry about it.

Set Up PHP on Your Own PC

However, if your server does not support PHP, you must:

  • install a web server (WAMP, MAMP)
  • install PHP
  • install a database, such as MySQL

The official PHP website (PHP.net) has installation instructions for PHP: http://php.net/manual/en/install.php

How to install XAMPP server on windows

You will learn to install the XAMPP server on the Windows platform step by step. Follow the below steps and install the XAMPP server on your PC or Laptop device.

Step 1. Google for Apache XAMPP

Google for Apache XAMPP

Google for Apache XAMPP

Step 2. Go to the Download page, and look for the latest stable version, and click on the Download 64 bit button.

Download XAMPP for Windows PHP 8

Download XAMPP for Windows PHP 8

Note: If you are looking for 32 bit downloads, unfortunately it’s not available on the official website. Then, you need to search for “xampp 32 bit download” on google.

Step 3. When Download is completed, you need to start installing the software. Double click on the downloaded file and allow XAMPP to make changes in your system, if asked by the system. A window pop-up will show, where you have to click on the Next button.

Step 3. PHP Installation Setup

Step 3. PHP Installation Setup

Step 4. Here, select the components you want to install and clear the components you do not want to install and click on Next when you are ready to continue.

Step 4. PHP Installation Setup

Step 4. PHP Installation Setup

Step 5. Select a folder, choose the location where you want to store the Xampp in your system and click on Next.

Step 5. PHP Installation Setup

Step 5. PHP Installation Setup

Step 6. Again click on Next and move further.

Step 6. PHP Installation Setup

Step 6. PHP Installation Setup

Step 7. Time has come now, XAMPP is ready to install, so click on the Next button and install the XAMPP.

Step 7. PHP Installation Setup

Step 7. PHP Installation Setup

Step 8. Setup has finished installing XAMPP on your computer, when you get to read this message. A finish Button will appear, so click on the Finish button.

Step 8. PHP Installation Setup

Step 8. PHP Installation Setup

Step 9. If asked, Choose your preferred language.

Step 9. PHP Installation Setup

Step 9. PHP Installation Setup

Step 10. When XAMPP is ready to use. Run the XAMPP control panel and start the Apache server and MySQL.

Step 10. PHP Installation Setup

Step 10. PHP Installation Setup

Now we can run PHP on the localhost! So excited to start...

Step 11. PHP Installation Setup

Step 11. PHP Installation Setup

What You Should Already Know

Before you continue you should have a basic understanding of the following:

  • HTML
  • CSS
  • JavaScript

We are going to use basics of HTML, CSS and Javascript. If you don’t know much, no worries - we are going to practice and do it all over again for you to get a better understanding. Please read the tutorials about HTML, CSS and Javascript.

My priority is to be excellent at PHP programming in detail and depth knowledge to build something new.