How to specify PHP version on the Plesk server for command line command "php" for user

Follow

Comments

3 comments

  • Avatar
    Jari Koivisto

    I tried to add .bashrc file with php alias line, but it didn't do the trick for me.

    I had to add PATH to .bash_profile file:

    echo "PATH=/opt/plesk/php/7.1/bin:$PATH" >> ~/.bash_profile

    Log out and log in. After that php -v show version 7.1.*

     

  • Avatar
    Ivan Postnikov

    Hello @Jari, thank you for sharing your experience, it may be useful for other Pleskians.

    I have checked the instructions on a test server with CentOS 7 and Debian 9, the provided steps were sufficient. 

  • Avatar
    Sander de Snaijer

    Thanks Jari your solution helped!

Please sign in to leave a comment.

Have more questions? Submit a request