Install and Configure PHP Manager for IIS on Windows Server

PHP Manager is a user-friendly graphical utility designed to simplify the installation and administration of PHP on Windows servers running Internet Information Services (IIS) — Microsoft’s powerful, secure, and high-performance web server. IIS is a popular choice for hosting websites and web apps on Windows platforms, and PHP Manager streamlines the process of integrating PHP into this environment. Using PHP Manager, you can manage multiple PHP versions, toggle extensions on or off, and adjust PHP settings through the php.ini file, all via an intuitive interface built for IIS.

This guide explains how to install PHP Manager for IIS on a Windows Server. The following step-by-step instructions will also demonstrate how to deploy a sample PHP application to ensure your setup is functioning correctly.

Prerequisites

  • Deploy a Windows Server instance on centron.
  • Access the server remotely.
  • Download and install the Microsoft Web Platform Installer.

Step 1: Install IIS on Windows Server

  1. Open the Windows Server Manager.
  2. Choose Add roles and features.
  3. In the installation wizard, select Role-based or feature-based installation and click Next to proceed.
  4. Scroll through the list of roles and check Web Server (IIS).
  5. Click Next and confirm the IIS installation.
  6. After installation, open your Windows Server’s public IP address in a web browser to verify IIS is running.

Step 2: Install PHP Manager on Windows Server

  1. Download PHP Manager from the official Microsoft portal.
  2. Run the downloaded .msi setup file and complete the installation on your server.

Step 3: Install PHP and IIS CGI

  1. Open the Microsoft Web Platform Installer from the Start menu.
  2. In the search bar (upper right), type IIS CGI.
  3. From the search results, click Add next to IIS: CGI.
  4. Then, search for PHP 7.4 and select PHP 7.4 (x86) for installation.
  5. Click Install to download and add the necessary components to your server.

Step 4: Set Up PHP Manager with IIS

  1. From the Start Menu, open Internet Information Services (IIS) Manager located under Windows Administrative Tools.
  2. Select your server name within the IIS Manager interface.
  3. Click PHP Manager under the IIS section.
  4. Verify the installed PHP version and click Check phpinfo().
  5. When prompted, select localhost as the test URL and click OK to display your PHP configuration information.

PHP Info

  • To register multiple PHP versions, download the desired version and choose Register new PHP version within PHP Manager.
  • To modify PHP or edit the php.ini file, open the PHP Settings section in PHP Manager.
  • To install, enable, or disable PHP extensions, navigate to the PHP Extensions area.

Step 5: Test PHP on Windows

  1. From the Start menu, open Notepad as an administrator (under Windows Accessories).
  2. Insert the following PHP script into the file:

 PHP is successfully installed on this Windows Server 
";
  echo "

Below is the current installed PHP version and information:

“; phpinfo(); ?>

  1. Save the file as All Files in the C:\inetpub\wwwroot\ directory, naming it with a custom filename and the .php extension, for example, test.php.
  2. Open a web browser and visit the file using your server’s IP address:

http://windows-server-ip/test.php

Your PHP test page should load successfully and display the PHP configuration details for your server.

Conclusion

You’ve successfully configured PHP Manager and installed PHP on your Windows Server. You can now deploy and run PHP applications on this system. For more details on using PHP Manager, consult Microsoft’s official documentation.

Source: vultr.com

Create a Free Account

Register now and get access to our Cloud Services.

Posts you might be interested in: