I’m running Plesk Version 17.0.17 Update #16 on Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
My problem is that I cant figure out how to update the global PHP version to 7.1 through Plesk
I need to do this as it is required by a package I am trying to install with Composer.
I cannot remove it because it says that “Plesk is using the old version to run” and I cant seem to change the version that Plesk uses. I can only set it for individual websites and I’m not interested in running more than one PHP version.
I have already installed the new version and I am able to run it when I create a symbolic link like this:
ln -s /opt/plesk/php/7.1/bin/php /usr/bin/php
When I do this everything works fine and the problem only occurs when Plesk updates it and overwrites the path causing me to have to do it again.
I cant just remove the old version through Plesk as it says it conflicts with Plesk itself as it uses it to run.
Summary:
I want Plesk to run PHP version 7.1 and remove the old version completely.
How can I do this?
3
Answers
Use this:
where {X} = version ex. 5
For PHP 5.5, PHP 5.6 and PHP 7.0:
apt-get update; apt-get install php{X};
Then update the package lists and perform the upgrade:
sudo apt-get update
Well you should make sure that no website is using the old php version. After that you should be able to remove the old php version from Plesk. You should not have to create a symbolic link manually. That can cause problems with Plesk.
Maybe better to said composer use specific PHP binary?
For example you can just add the following line into the .bashrc file from your user folder:
Or
To verify you have to relogin/recreate bash session and check
$PATH
variable: