Categories
Web Developing

Update PHP Version for SSH Command Line

# To show a list of PHP versions
sudo update-alternatives --config php

# Example Results:
Selection    Path             Priority   Status
------------------------------------------------------------
  0            /usr/bin/php7.4   74        auto mode
  1            /usr/bin/php7.0   70        manual mode
  2            /usr/bin/php7.1   71        manual mode
  3            /usr/bin/php7.2   72        manual mode
  4            /usr/bin/php7.3   73        manual mode
* 5            /usr/bin/php7.4   74        manual mode

# Then Choose the number in front of each PHP version to switch to different PHP version for Command Line.

By Ethan

To many, a business is a lifetime commitment. It's easy to start one yet difficult to make it successful. Attitude, skills, experiences and dedication help hone the craft along the way, but it's often the great vision and resilience to remain focused wins the game. Read more about me here