How to Install PHP on Windows With IIS Web Server

How to install PHP on windows with IIS web server? mostly beginners of PHP web development language are searching this question. As you know today PHP is the besic need of the world, it’s most essential powerful scripting language. Use of PHP is growing day to day in the world of technology. If you don’t know how to install PHP on windows, I will show you in this post, just read it to the end.

install php on windows
IIS Web Server

Install PHP on Windows:

When ever you install Windows, 7, 8, 8.1, 10 , XP or Vista PHP is not installed by default. You need to make Windows to run PHP script with some special efforts. Xampp, IIS and some other web servers are designed to run PHP and other scripts on Windows. If you install Xampp, IIS or any other PHP compatible Web Server, I hope you will be able to run PHP script in your Windows.

IIS Web Server:

By default Windows don’t enable IIS web server, but if you want enable it, you may do so. It’s very easy and simple, I will show this in step by step guide.

Step 1:

Go to Controle panel, click on programs, and then Turn Windows features on or off as shown in image below:

install php on windows
Turn Windows features on or off

Step 2:

Expand Internet Information Services, Expand Web Management Tools, Expand World Wide Web Services, Expand Application Development Features. Now start to apply check boxes to have some features as follow.

Web Management Tools:
  • IIS 6 Management Compatibility
  • IIS Management Console
  • IIS Management Scripts and Tools
  • IIS Management Service
World Wide Web Services:
  • CGI
  • Server-Side Includes
Internet Information ServicesHostable Web Core:
  • Internet Information ServicesHostable Web Core

After clicking on the check boxes above just clik on OK button and wait for some time and then restart your computer.

How to Check Web Server:

After installing IIS Web Server the next step is to check it. Is it working properly or not? To check IIS Web Server open up notepad or any text editor create a new file in html format like index.html.


<title>This is my first page</title></head>
<h1>Welcome dear, It's my first page</h1>


Now open up file explorer and copy index.html and past it into c:\inetpub\wwwroot folder. If index.html is already exists in c:\inetpub\wwwroot folder then over write it. You will see the output as follow:

Now open up any internet browser like safari, firefox, opera or chrome and type localhost/ and press enter button from keybord.

Welcome dear, It's my first page

If results would be different than above it means web server is not working properly.

Download PHP Latest Version:

After installing IIS Web Server properly then you need to download latest version of PHP from, it would be in Zip format, unzip PHP program and copy it into the same drive in which you have installed IIS Web Server i.e. Windows.

Configure PHP on Windows:

If you don’t know how to configure PHP in Windows, don’t worry, I have already published a post about it. You just need to read it. Configure PHP on Windows

Check Windows Supports PHP Script:

To check support for PHP in Windows you just need to create a PHP file. To create a PHP file just open up notepad or any other text editor. Type the following code and save it as welcome.php

echo "Hello everyone are welcome in newly installed Xampp and PHP";

Now open up file explorer copy the welcome.php file and save it into c:\inetpub\wwwroot then open internet browser like Chrome or Firefox. Now type http://localhost/welcome.php. Output of this file would be like below:

Hello everyone are welcome in newly installed Xampp and PHP

If the output will be above like it means PHP is configured in Windows and you are ready to use it.

Check PHP Version in Windows:

Whether you are using Xampp, IIS web server or any other web server for PHP in Windows. You just need to check PHP version, it would be helpful for you to know that PHP is really installed in Windows or not?

Open up command prompt by pressing Windows key with R from keyboard and type cmd and then press enter from keyboard.

Now type php -v and press enter button, it will process for a while and then produce results about PHP version. If PHP will not be installed in your Windows it will inform you by a message. Results would be look like this.

install php on windows
Latest PHP Version copy

If you want to install Xampp in your windows don’t worry, I have already published a post. You just need to read this post to install Xampp on Windows. How to Install PHP on Windows with Xampp

If you want, your website should work fast, I recommend you this post, I hope it will help you to achieve your task. Speed Up Websites by Making Fastest PHP Caching with phpFastCache

Leave a Reply

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