How to Setup PHP Manager on Windows with IIS

Updated on July 25, 2024
How to Setup PHP Manager on Windows with IIS header image

PHP Manager is a graphical tool that allows you to install, run, and manage PHP versions on a Windows server running the Internet Information Services (IIS) webserver. It can enable or disable PHP extensions and configure PHP settings through the php.ini file as required by hosted applications.

In this article, you will learn how to install PHP Manager on a Windows Server with IIS. Furthermore, you will set up a sample PHP application to test the installation.

Prerequisites

Step 1: Install IIS

  • Open the Windows Server Manager.
  • Select Add roles and features.
  • In the open window, navigate through the options and select Role-based or feature-based installation, click Next to continue.
  • Then, scroll through the list of roles and select Web Server (IIS).
  • Click Next, and confirm IIS installation.
  • Finally, visit your Windows Server Public IP address in a web browser.

Step 2: Install PHP Manager

  • Download PHP Manager from the Microsoft Portal here.
  • Install the downloaded .msi setup file on the server.

Step 3: Install PHP and IIS CGI

  • From the Start menu, locate and open Microsoft Web Platform Installer from the applications list.
  • Now, in the search bar (top right), enter the keyword IIS CGI.
  • From the list of results, click Add next to IIS: CGI.
  • Next, enter PHP 7.4 in the search bar and select PHP 7.4 (x86) from install.
  • Click Install to download and add the packages to your server.

Step 4: Setup PHP Manager

  • Open the Windows Start Menu, then locate and open the Internet Information Services (IIS) manager under the Windows Administrative Tools group.
  • Now, select your Server name in the IIS Manager Window.
  • Then, click PHP Manager from the tabbed IIS group.
  • Verify the installed PHP version, and click Check phpinfo().
  • In the open dialog, select localhost as the test URL and click OK to view your current PHP information.

PHP Info

  • To install multiple PHP versions, download the PHP version, and click Register new PHP version in PHP Manager.
  • To configure PHP and the phpini file, navigate to the PHP Settings section in PHP manager.
  • To install, enable or disable extensions, navigate to the PHP Extensions section.

PHP Manager

Step 5: Test PHP on Windows

  • From the start menu, locate and open Notepad as an administrator from the Windows Accessories group.

  • Then, add the following contents to the file:

       <?php
    
      echo "<h1> PHP is sucessfully installed on this Windows Server </h1><br>";
    
      echo "<h3> Below is the current installed PHP version and Information: </h3> <br>";
    
      phpinfo();
    
      ?>

Save the file in the C:\inetpub\wwwroot\ directory as All Files, with a custom name and the .php extension, for example, test.php.

  • Now, open a browser and load the PHP file on your server.

      http://windows-server-ip/test.php
  • Your PHP application should load and display the server PHP Information.

Conclusion

You have successfully set up PHP Manager and installed PHP on your Windows Server. Next, you can build and run PHP applications on the server. For further information on how to use PHP Manager, refer to the Microsoft documentation page.