How To Install PHP In Windows 10

To start programming with PHP is one of the parts of web development skills and installing PHP In on your Windows 10 machine considered as the first step of learning PHP skill using a local machine. Here we discuss the various method to Install PHP In Windows 10 OS.

  • Install PHP in Windows OS using the PHP development environment.
  • Manually install PHP by PHP official file Setup.

Install PHP in Windows 10 OS using XAMPP

Now we check how we install XAMPP in our Windows machine step by step,

First, you have to check your system configuration. To check the configuration right click on This PC or My Computer then click on properties, there you can see like below. In my case,

Step 1: Then we have to download the EXE file of the XAMPP server from the official site https://www.apachefriends.org/download.html.

Step 2: After completing the download click on the .exe setup file,

Step 3: Click NEXT and then you can see all the check ticks on all options then click on NEXT.

Step 4: Now after the above screen we can see the selected path where XAMPP can install. You can also specify the installation path according to your choice by changing the same.

Step 5: Now click next on multiple-step then installation starts automatically and after completing the installing of XAMPP, you can see the XAMPP control panel.

Now you can ready with your PHP installation on Windows 10 OS using external PHP development environment XAMPP.

Manually install PHP on Windows by PHP official File Setup

Step 1: Download the PHP files

Step 2: Extract the ZIP

PHP can be installed any drive on you windows system but for future steps I suggest you to do not change the path.

Step 3: Setting up PHP configuration file php.ini

On the same config INI file you have to enable some important PHP extension by removing semi colon (;) from their start.

Open you the php.ini file in your text editor and search for below extension and enable them.

extension=curl

extension=gd

extension=mbstring

extension=pdo_mysql

And if you want to send mail using the localhost, you can check Send Mail From Localhost in PHP Using XAMPP.

Step 4: Add PHP location on PATH environment variable

To reach environment variable Click on Advance System Setting,

Then click on Environment Variable and click on PATH > Edit. Now you can create new variable.

Step 5: Setup Apache Module

# PHP8 module

PHPIniDir “C:/php”

LoadModule php_module “C:/php/php8apache2_4.dll”

AddType application/x-httpd-php .php

Step 6: Test PHP File

<?php

echo phpinfo();

?>

Now open your browser and write on URL bar http://localhost/index.php or any other file name to run.

Here is the complete step by step process to install PHP in Windows 10 or any the windows version.

If you got any error please let me know on the comment.

Also Read:

Happy Coding..!