This article provides instructions for changing the PHP version used in command line interface through SSH.
Follow the steps-
- Connect through SSH.
- If the file does not exit, create a “.profile” file-
touch ~/.profile - Modify the .profile file-
nano ~/.profile - Now, add this code to the file to select the required php version-
export PATH=/opt/php7.4/bin:$PATH
- Load the .profile file-
source ~/.profile - Finally, Check the php version-
php –v
In such a manner, you can change the PHP version used in the command line interface through SSH.
Also Read: How to change the PHP version for a website in Plesk
Related Articles
How to monitor active connections and network usage on your VPSApril 20, 2024
How to monitor incoming and outgoing network connections in Linux serversApril 19, 2024
How to set the possession of an unowned DNS ZoneApril 17, 2024
How to fix “There Has Been a Critical Error on This Website” issueApril 15, 2024