Article overview

Help article

Plesk: I want to update the PHP version

Our preinstalled version of Plesk comes with CentOS as the underlying OS. By default CentOS uses some older versions of software (although updated with the latest security updates) because it prefers stability above the latest features. This is also the reason that the default PHP version is usually a few versions behind on what is available. If you want to use PHP 7 for example, you will first need to update the PHP version on your VPS.

Please note!
- It is not without risk to update the PHP version on your VPS. You are advised to always create a snapshot before performing below commands in case something goes wrong.
- it is possible to use the regular yum update command to update the PHP version. In most cases this will require the use of an extra repository, because the default CentOS repository does niet contain any 'newer' versions. Check Webtatic.com for more information on the installation of such repositories. This is also needed if you want the OS itself to run a different versions of PHP, for example because you want to use SSH to install themes or modules for your CMS.
- You can always check the current installed version of PHP by running the command php -v.

Step 1: Check the available PHP versions
PHP Settings
  • Via the option PHP Settings (located under Tools & Settings) you can see all the currently available PHP versions and 'interpreters'.
Add additional PHP-versions
  • Should the version you want to use not be listed there, you can add this via the Plesk Installer (with the exception of obsoleted versions). Go to the option Updates and Upgrades under Tools & Settings to open this installer.
  • Add the additional versions / options and save these.

Step 2: Updating PHP
the current PHP version
  • When selecting your website under Websites & Domains, you will see the current PHP version listed (below PHP Settings).
Change the current PHP version
  • When selecting the PHP Settings option you will get a 'dropdown' menu in which you can select another PHP version. This same page offers additional option such as setting the maximum amount of PHP memory your website may use. Change the settings as desired and press Applyand Ok to save.
  • Your website will now use a different version of PHP!

Has this article been helpful?

Create an account or log in to leave a rating.

Comments

Create an account or log in to be able to leave a comment.