Use PHP 7.4 in Hostgator CLI
Login to the shell
vim ~/.bashrc
add the following in the .bashrc
alias php='/opt/cpanel/ea-php74/root/usr/bin/php' export PATH="/opt/cpanel/ea-php74/root/usr/bin:$PATH"
add the following in the .bashrc
alias php='/opt/cpanel/ea-php74/root/usr/bin/php' export PATH="/opt/cpanel/ea-php74/root/usr/bin:$PATH"
source the .bashrc, or do a re-login
Reference
https://stackoverflow.com/questions/39643805/need-to-run-composer-update-on-ssh-on-hostgator-but-php-v-to-low