I need to set up a PHP cronjob. What are the paths to the PHP interpreter?
Learn how to set up a PHP cronjob and the paths to the PHP interpreter on cPanel/WHM and Plesk. Find quick and efficient solutions for VPSs.
The PHP interpreters that can be used for creating cron jobs are located at the paths:
In the case of the cPanel/WHM (VPS):
/usr/bin/php
/usr/local/bin/php
/opt/cpanel/ea-phpXX/root/usr/bin/php
***XX = PHP version, without a point, example php56
In the case of the Plesk (VPS):
/usr/bin/php
/opt/plesk/php/X.X/bin/php
*** X.X = PHP version, with a point, example php5.6
In the case of the cPanel/WHM (Shared):
/usr/bin/php
/usr/local/bin/php
/opt/alt/phpXX/usr/bin/php
***XX = PHP version, without a point, example php56
Except for special cases (the PHP script explicitly requires a different path than the standard one), it is recommended to use /usr/bin/php