Step by Step - Installing IIS & PHP

In this detailed guide, we walk you through each stage of the installation process, ensuring you have a smooth and hassle-free experience. Starting from the installation of IIS, we guide you through enabling the necessary role services and features, setting up PHP for seamless integration with IIS.

Apr 12, 2024 - 17:59
Step by Step - Installing IIS & PHP
ISS & PHP Installation

0. Before Start:

Step by Step - Installing Server 2019 - superuser (kbsuperuser.com)

1. Install Internet Information Services (IIS)

Open the Server Manager by clicking on the Start button and selecting "Server Manager".

In Server Manager, click on "Manage" from the top-right corner and select "Add Roles and Features".

Click "Next" until you reach the "Server Roles" section.

Click "Next" until you reach the "Server Roles" section.

Click "Next" until you reach the "Server Roles" section.

Check the box next to "Web Server (IIS)".

Check the box and click “Add Features”.

Click "Next" until you reach the "Role Services" section.

Click "Next" until you reach the "Role Services" section.

Ensure that the required role services are selected. For PHP, CGI is needed under Application Development.

You might also want to select other components depending on your requirements such as “Windows Authentication.”

Click "Next" and then "Install" to begin the installation process.

Once completed, click "Close."

2. Install PHP

Download the PHP installer for Windows from the official PHP website https://windows.php.net/download/

Choose the appropriate version of PHP for your system architecture (x86 or x64) and download the Thread Safe version.

Create a folder named “PHP” and move extracted files to that folder. Place this folder under C drive.

Rename “php.ini-development” as php.ini. You may open this ini file and edit according to your application requirements.

Open Internet Information Services (IIS) Manager. You can find it in the Start menu under Windows Administrative Tools.

In IIS Manager, select the server node in the Connections pane. Double-click "Handler Mappings" in the middle pane.

In the Actions pane, click "Add Module Mapping. And fill the settings as shown. Click OK.

Create a new text file in a directory accessible to your web server (e.g., C:\inetpub\wwwroot) and name it "phpinfo.php".

Open phpinfo.php in a text editor and add : <?php phpinfo(); ?>

Open a web browser and navigate to http://localhost/phpinfo.php

If PHP is configured correctly, you should see this page.

Well Done!

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow