• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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