How to change PHP CLI version for composer and plesk at the command line
Below is the command line code for changing the default PHP version in Plesk. If you are using Plesk as I do on a number of VPS servers, even though you can change the php version inside the Plesk domain control panel, this does not change it at the command line.
I use Putty to connect to the command line. To connect your domain name in Plesk to the command line, you go to "Web hosting access" in the domain subscription type.
Here you will find the two important things.
1) A field with your "username" already filled in.