How to Manually Install PHP 7.4 on Windows Server 2019


  • You want to deploy a PHP application or WordPress on Windows Server 2019.
  • You want to update PHP to any version to address compatibility or security issues in Windows.
  • You want to understand how PHP works with IIS.


  • Install CGI for IIS on Turn Windows features on or off > Internet Information Services > World Wide Web Services > Application Development Features > CGI.
  • Download VC15 x86 Non Thread Safe package here or under PHP 7.4 section from
  • Extract the ZIP file to the C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86 folder.
  • Rename the php-.ini-development file to php.ini.
  • Open the php.ini file and add the following line at the end of the file.
  • Uncomment the following lines
    fastcgi.impersonate = 1;
    cgi.force_redirect = 1 (and change the value to 0, i.e. cgi.force_redirect = 0)
    extension_dir = "C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\ext"
    error_log = "C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php_errors.log"
    error_log = syslog
  • A sample php.ini file can be download here.
  • Add C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86 to System Path.
  • Download x86 package of WinCache 2.0 for PHP 7.4 here or from
  • Extract and copy the php_wincache.dll file to C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\ext
  • Open IIS, click on Server name, double click on Handler Mappings, click on Add Module Mapping, and enter below information.
    Request path = *.php
    Module = FastCgiModule
    Executable = "C:\Program Files (x86)\php-7.4.9-nts-Win32-vc15-x86\php-cgi.exe"
    Name = PHP 7.4
    Request Restrictions = File or folder
  • Download and install VC_redist.x86.exe of Microsoft Visual C++ Redistributable for Visual Studio 2019 here or on
  • en a Command Prompt, execute below command and ensure that NO WARNINGS APPEAR.
    php --version
  • Create phpinfo.php file with below content in the root website folder.
    <?php phpinfo(); ?>
  • Open http://localhost/phpinfo.php URL and verify PHP information.


(Visited 9,122 times, 1 visits today)

Leave a Reply