• The ImunifyAV extension is now deprecated and no longer available for installation.
    Existing ImunifyAV installations will continue operating for three months, and after that will automatically be replaced with the new Imunify extension. We recommend that you manually replace any existing ImunifyAV installations with Imunify at your earliest convenience.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.

Question How to change an existing Plesk php symbolic link on Ubuntu?

PeopleInside

Regular Pleskian
Server operating system version
Ubuntu 22.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.67 21 January 2025
Ubuntu 22.04.5 LTS
Code:
# which php
/usr/bin/php

Code:
# ls -l /usr/bin/php
lrwxrwxrwx 1 root root 26 Mar 15  2024 /usr/bin/php -> /opt/plesk/php/8.3/bin/php

I installed php 8.4 in Plesk, how can I use also on SSH php 8.4?
 
The simplest approach is to:
Code:
export PATH=/opt/plesk/php/8.4/bin:$PATH

This will change the PHP version for the current session. However, if you set the PHP version to 8.4 for the website, phpenv should use that PHP version.
 
This is a SSH command?
This will work only for the current SSH session and will be reverted?

if you set the PHP version to 8.4 for the website, phpenv should use that PHP version.
I think I'm not understanding.
 
Yes, it's an SSH command and it will affect only the SSH session it was run in.
Export will update the SSH environment. The PATH environment variable designates the folders where the shell will look for binaries, including php. By prepending the location of PHP 8.4 in $PATH, php will be found in /opt/plesk/php/8.4/bin, instead of /usr/bin.
You can make it persistent by adding the command in ~/.profile

Plesk has a feature which sets the CLI PHP version to the PHP version set for the corresponding website in Plesk. If you change the website to PHP 8.4 and ssh to the server using the website's system, user
Code:
php -v
should show 8.4, regardless of where /usr/bin/php links to.
 
Back
Top