In WHM / Cpanel many hosts like us use Litespeed to speed up PHP and the server. Litespeed allows multiple versions of PHP that you can configure using .htaccess php handlers. But what about changing the PHP version used for command line (also for cron jobs)? There is a easy solution. Login to ssh for the cpanel account, and in the home/username/.bashrc file (you can edit with with: nano .bashrc) add this line to the end (substitute the /usr/bin/php5.6 with the path to the custom php binary you want to use):
alias php='/usr/bin/php5.6'
Now logoff and login to ssh, and if you type:
php -v
you can confirm it’s using the version of PHP you want.