Running Craft Console Commands on Webfaction I'm trying to run a few of Craft's console commands on a Webfaction server to automate running Craft migrations and resolving Project Config changes, and it's throwing an error.
Here's what I'm doing:
php craft migrate/all
php craft project-config/sync
Turns out this was a problem with running the right version of PHP. I was able to fix the issue by changing my command from php to php74, directly specifying the version of PHP that I want to run. This should work with php71 php73 and future versions like php80 too.
Here's what my commands look like now:
php74 craft migrate/all
php74 craft project-config/sync