Skip to content
Windows Hosting

How to Upgrade the PHP Version in Plesk on Linux and Windows

In this article13 sections

Plesk gives you the same kind of control over PHP as cPanel does, but the menus and the terms are different, and the Linux and Windows editions behave differently underneath. On Linux, Plesk runs PHP as an FPM service served by Nginx or Apache. On Windows, it runs PHP through IIS and FastCGI. In both cases you choose the version for each website, you can have several versions installed side by side, and you can move back in a minute. This guide shows how to see what is installed, add a newer version, switch a website to it, adjust the settings, and verify the result, with notes for each edition.

Siteharbour’s Windows hosting plans run Plesk on Windows Server 2022 with IIS 10, and the steps below describe how Plesk handles PHP on that platform and on Linux. Which PHP versions are available on a given plan depends on what the host has installed, so check the version list in your own panel.

How Plesk organises PHP

Plesk keeps a list of PHP versions installed on the server, called handlers. Each website picks one of them, and one way of running it: as an FPM application served by Nginx, as an FPM application served by Apache, or as a FastCGI application. FPM gives each website its own pool of PHP processes, which is faster and keeps one site’s load away from another. On Windows, the choice is between FastCGI and, on older setups, ISAPI, and FastCGI is the one to use.

You will see two levels of settings. The server-wide list is under Tools & Settings. The per-website choice is under the website’s own PHP Settings. If you are not the server administrator, you only see the second level, and the available versions are the ones your host has installed.

Before you start

  • Back up the website. Use Plesk’s Backup Manager, as described in how to back up a Plesk website and restore it.
  • Write down the current version and settings of each website, including memory_limit, upload size and any custom directives. A screenshot of the PHP Settings page is enough.
  • Check compatibility of your code, as covered in how to check your code for PHP compatibility before you upgrade.

Step 1: See which PHP versions are installed

As the server administrator, open Tools & Settings and select PHP Settings. The page lists every installed PHP version, with its handler type and whether it is enabled. Versions that have reached the end of their support life are often marked, and Plesk may warn about them. A website owner without server access can see the same list, limited to what the host allows, in the website’s own PHP Settings, in the version dropdown.

Expected: at least one current version, such as 8.3 or 8.4. If the version you want is missing, go to Step 2. If you are a customer, ask your host to install it.

Step 2: Install a newer version (administrators)

Plesk installs PHP versions through the Plesk Installer, which you open from Tools & Settings > Updates, then Add/Remove Components. Find the PHP group, tick the version you want, and select Continue. The installer downloads and installs it next to the existing versions, without replacing them. Installing a version does not move any website to it.

On a Linux server, you can also install the same packages from the command line with the Plesk installer tool, but the panel route is safer because it registers the new version for you. On a Windows server, the installer adds the version and the FastCGI mapping together.

Step 3: Test on a copy of the website

Create a test subscription or a subdomain, copy the site and its database into it, and switch only that copy to the new version, as in Step 4. Click through the site with error display on. The test copy should not be reachable by search engines, so password-protect it or use a non-public subdomain. A site that runs cleanly on the copy for a day is a good candidate for the real switch.

Step 4: Switch a website to the new version

Open Websites & Domains, find the website and select PHP Settings. At the top, choose the new version in the PHP version list. Below it, choose how PHP runs: FPM application served by nginx or FPM application served by Apache on Linux, or FastCGI application on Windows. Select OK or Apply at the bottom of the page.

Plesk reloads the website’s configuration at once. If you changed the handler type as well as the version, change only one of them at a time, so a problem points at one cause.

Step 5: Set the PHP options

On the same PHP Settings page, review the values that affect the site. Settings do not always carry over between versions, so compare them with your notes:

  • memory_limit, max_execution_time and max_input_time.
  • post_max_size and upload_max_filesize, which cap file uploads. The same limits at the web server level are covered in how to fix 413 Request Entity Too Large on Nginx and PHP.
  • display_errors, which should be off on a public site, and error_reporting.
  • OPcache settings, if your plan lets you change them.

Plesk also has a text box for additional directives, where you can add lines in the same syntax as php.ini. Keep that list short and add a comment for each line, so the next person knows why it is there.

Step 6: Check the extensions

Most extensions are installed with the PHP version and are enabled in the same page, or listed under a separate extensions section. Check that the ones your site uses are on: mysqli or pdo_mysql, curl, mbstring, gd, intl, zip, and on Windows with Microsoft SQL sqlsrv and pdo_sqlsrv. A missing extension shows up as an undefined function error. If an extension is not available in the list, the administrator must install it, since it is a server component.

Step 7: Verify, then watch the logs

Create a file named version-check.php in the site’s folder that contains <?php echo PHP_VERSION;, open it in a browser, and delete it straight away. Expected: the new version. Then open the website’s Logs page in Plesk and read the error log after a few hours and again the next day. Look for Fatal error lines first, then Warning and Deprecated. The common ones, and their fixes, are in how to fix common errors after a PHP upgrade.

Step 8: Roll back if needed

Return to the website’s PHP Settings, choose the earlier version and apply. The change is immediate. If the problem is a database change that the new version triggered, restore the database from your backup as well. Keep the old version installed on the server for at least a week after the last website has moved.

Windows specifics

On Windows, PHP runs through IIS FastCGI, and the Plesk PHP Settings page is the supported way to switch. Do not edit the handler mappings in IIS Manager by hand for a website that Plesk manages, because Plesk will overwrite them the next time it applies the site’s settings. If you need PHP to run on a Windows server that is not managed by Plesk, read how to upgrade PHP on IIS with FastCGI.

Common mistakes

  • Changing the version and the handler together. You cannot tell which change caused a problem.
  • Not copying the settings. A lost memory_limit or upload limit looks like a broken site.
  • Editing IIS handlers on a Plesk site. Plesk overwrites them.
  • Removing the old version too soon. Keep it until every site has run cleanly on the new one.
  • Forgetting scheduled tasks. A Plesk scheduled task that calls PHP may name a version path directly.

Frequently asked questions

Can each website use a different PHP version?

Yes. The choice is made per website, so you can move them one at a time.

Why is the version I need not in the list?

The server administrator has to install it through the Plesk Installer. Customers on shared hosting should ask the host.

Does the version change restart the whole server?

No. Plesk reloads the configuration for that website only, so other websites are not affected.

Which handler should I choose?

On Linux, an FPM application, served by Nginx if the server runs Nginx in front of Apache or by itself, or by Apache otherwise. On Windows, FastCGI.

On Plesk, upgrading PHP is a per-website setting: confirm the versions installed, add the one you need through the Installer if you administer the server, test on a copy, switch one website, review the options and extensions, then verify and watch the logs. The rollback is as fast as the change. For the same job on a classic cPanel account, read how to upgrade the PHP version on cPanel.

Want this done for you? If you would rather have an engineer plan and carry out the work on your own site, you can hire the author through the Upwork profile of Munaf Sheikh.

Share this guide