Switching PHP Handler Type to FastCGI

By default, in IIS Plesk Control Panel uses ISAPI to run PHP applications. You can also use CGI or FastCGI. For better performance it is recommended to switch the PHP handler type in IIS to FastCGI. The type of PHP handler is defined by the "PLESKCP_PHP_MODE" value of the HKEY_LOCAL_MACHINE\SOFTWARE\PLESK\PSA Config\Config key of Windows registry (isapi, cgi, or fastcgi).

To set FastCGI as PHP handler type, follow these steps:

  1. Log in to the Plesk server as the administrator using Remote Desktop.
  2. Make sure FastCGI component is installed on the Plesk server. For details refer to "Automatic Installation of Plesk Components" section.
  3. Start Windows registry editor.
  4. In the HKEY_LOCAL_MACHINE\SOFTWARE\PLESK\PSA Config\Config key, set the "fastcgi" value for the "PLESKCP_PHP_MODE" parameter.

    Note: If the "PLESKCP_PHP_MODE" parameter is absent or set to "isapi", ISAPI is used as the PHP handler. If the "PLESKCP_PHP_MODE" parameters value is "cgi", CGI is used.

  5. Start Plesk Reconfigurator and select the Repair Plesk Installation option. The Check & Repair window opens.
  6. Select Plesk Services in the list and click Check.

To switch between PHP handler types, use Plesk Reconfigurator in one of the following ways:

  1. Log in to the Plesk server as the administrator by using Remote Desktop.
  2. Set the "PLESKCP_PHP_MODE" value in the HKEY_LOCAL_MACHINE\SOFTWARE\PLESK\PSA Config\Config key of Windows registry (isapi, cgi, or fastcgi).
  3. Select the Repair Plesk Installation option of the Plesk Reconfigurator.
  4. Select Plesk Services in the list and click Check.

or

  1. Log in to the Plesk server as the administrator by using Remote Desktop.
  2. Set the "PLESKCP_PHP_MODE" value in the HKEY_LOCAL_MACHINE\SOFTWARE\PLESK\PSA Config\Config key of Windows registry (isapi, cgi, or fastcgi).
  3. Start cmd.exe and change directory to the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the Windows' system variable specifying the folder where Plesk is installed).
  4. Run the following command:

    Reconfigurator.exe /check=Services

or

  1. Log in to the Plesk server as the administrator by using Remote Desktop.
  2. Start cmd.exe and change directory to the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the Windows' system variable specifying the folder where Plesk is installed).
  3. Run the following command:

    Reconfigurator.exe --switch-plesk-web-server --new-provider=iis --php-handler-type=<isapi | fastcgi | cgi> --force