Plesk for Linux kb: how-to ABT: Group B
- Plesk for Linux
Is it possible to upgrade system PHP provided by OS vendor to the next version on a Plesk server?
If this is a server with Plesk Obsidian
On a fresh Plesk Obsidian, Plesk services do not depend on system PHP, which makes it possible to upgrade system PHP to the next version.
If this is a server with Plesk Onyx or previous release
It is not recommended to upgrade system PHP as Plesk and webmail depend on it. The upgrade should be performed at your own risk (a pre-upgrade server snapshot / backup is always recommended).
Warning: On a server with Plesk Onyx, before upgrading system PHP, change PHP for webmail using the steps from this KB article.
I have the same question and this response does not address it. I use PHP 7 in my applications but when I try to load packages via the command line I get errors like:
league/oauth2-client 2.3.0 requires php ^5.6|^7.0 -> your PHP version (5.4.45)
5.4.45 is by OS Vendor and I need to know how to update this as it is what the Centos command line thinks my PHP version is.
@Janet, use Plesk PHP in CLI instead of OS one:
# /opt/plesk/php/7.2/bin/php -v
PHP 7.2.3 (cli) (built: Mar 2 2018 14:04:04) ( NTS )
I have a similar issue. I recently uploaded a new wordpress version of a website and it won't allow certain plugins because the server php is too old. It is currently running php 5.3.3
How can it be updated without disryuption?
I would have thought this kind of update would have been automated, or at least handled by yourselves like with most ISPs
A Wordpress instance installed on a domain does not use server PHP version, it uses domain PHP version. PHP version may be selected at Domains > example.com > PHP Settings. New PHP versions, which will be available to select need to be installed according to this article.
@Janet, Avez-vous une cause nouvelles que j'ai le même problème que vous avez fait / fait? TIA.
Version of PHP selected at Domains > example.com > PHP Settings is actually not the same that is used in the command line.
To use another PHP version via the command line, use the full path to it, see the following article for additional details: https://support.plesk.com/hc/en-us/articles/115003766853-How-to-specify-PHP-version-on-the-Plesk-server-for-command-line-command-php-for-user-
Thx @Alexandr. I'm investigating the article you pointed at.
The article was very helpful for me!
If my Plesk Server an old server (example with Onyx), but now I upgraded to Obsidian?
So: Not Obsidian clear install. Ugraded to Obsidian with many long-running services (mail, domain, etc).
This plesk services do not depend on system PHP, which makes it possible to upgrade system PHP to the next version????????
Hi Eronar Diaras, that is correct, if you are running Obsidian Plesk services do not depend on system PHP which makes possible to upgrade system PHP.
How could I upgrade or replace the vendor php (5.4.16) in multiple php plesk system? (Plesk Obsidian)
Current php in the Tools and Settings > PHP Settings (/admin/php-handler/list) are:
- php 5.4.16 by OS vendor
- php 5.6.40
- php 7.1.33
- php 7.4.3
ssh #php -v:
PHP 5.4.16 (cli) (built: Nov 1 2019 16:04:20)
If PHP "php 5.4." is not needed for security reason you can disable it in Tools & Settings > PHP Settings and use only PHP provided by Plesk.
In case of it's needed to update system PHP you should find and enable a repository that contains newer PHP version and update PHP, for example:
Please sign in to leave a comment.