概要: Plesk provides support for multiple PHP versions and handler types out of the box.

In this topic you will learn how to install additional PHP versions in Plesk.

Installing and Uninstalling PHP Versions

サーバに特定の PHP バージョンをインストールするか、サーバからいずれかの PHP バージョンをアンインストールするには、次の手順に従います。

  1. Go to Tools & Settings > Updates (under "Plesk"), and then click Add/Remove Components.

    • (Plesk for Linux) [Web hosting]セクションを展開し、[PHP interpreter versions]セクションを展開します。
    • (Plesk for Windows) [Plesk hosting features] セクションを展開します。
  2. Here, currently installed PHP versions are marked with a green checkbox icon, and those currently not installed with a red cross icon. Select the PHP versions you want to install by clicking the corresponding icon > Install. Select the PHP versions you want to remove by clicking the corresponding icon > Remove. On the screenshot below, PHP versions 8.3, 8.2, 8.1, and 7.4 are marked for installation, while PHP version 8.0 - for removal.

    image php versions

  3. [Continue]をクリックし、選択した PHP バージョンのインストール/アンインストールを実行します。

追加 PHP バージョンをインストールするときはいつでも、Plesk が標準の PHP ハンドラタイプ(CGI、FastCGI、PHP-FPM)を自動的に構成します。

注釈: 古い OS(CentOS 6.x など)で PHP-FPM ハンドラの使用を有効にするには、PHP-FPM support from OS vendor コンポーネントのインストールが必要になります。このコンポーネントは、[コンポーネントを追加/削除]タブで[Web hosting] > [Nginx web server and reverse proxy server]セクションでにあります。

注釈: 新しい OS(Debian 9 など)には、古い PHP バージョン(5.6 以前)をインストールできない可能性があります。これは、これらの OS に付属する最新の OpenSSL バージョンに対応していないためです。

サーバにインストールされた PHP バージョンごとに、特定のハンドラタイプを顧客に対して使用可能/使用不可にすることができます(たとえば、PHP 8.3 では FastCGI と PHP-FPM の両方を使用可能にし、PHP 8.1 では PHP-FPM のみを使用可能にすることができます)。また、個々の PHP バージョンに対して PHP 設定を構成することもできます。

注釈: Plesk Obsidian 以降では、システムの PHP コンポーネントは必須ではありません。以下の操作が可能です。

  • システム PHP コンポーネントなしで Plesk をインストールする。
  • Plesk Obsidian をインストールするか、Plesk Obsidian にアップグレードした後で、システム PHP コンポーネントを削除する。
  • システム PHP コンポーネントの代わりにカスタム PHP ビルドをインストールして使用する。
  • システム PHP コンポーネントなしで Horde をインストールする。