• Hi, Pleskians! We are running a UX testing of our upcoming product intended for server management and monitoring.
    We would like to invite you to have a call with us and have some fun checking our prototype. The agenda is pretty simple - we bring new design and some scenarios that you need to walk through and succeed. We will be watching and taking insights for further development of the design.
    If you would like to participate, please use this link to book a meeting. We will sent the link to the clickable prototype at the meeting.
  • (Plesk for Windows):
    MySQL Connector/ODBC 3.51, 5.1, and 5.3 are no longer shipped with Plesk because they have reached end of life. MariaDB Connector/ODBC 64-bit 3.2.4 is now used instead.
  • 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.
 
Could I ask how can I add the command in the profile to made persistent?

Found:
Code:
# vi ~/.profile

then add the line
Code:
export PATH=/opt/plesk/php/8.4/bin:$PATH

at the end of the file and saving.
 
Back
Top