Running PHP CLI commands for Magento on a hosted environment like

If you want to run PHP CLI command for Magento extension installs on a hosted environment like, and don’t have access to SSH or composer, cron jobs can be really helpful.

I had to install an extension and then run setup:upgrade, but didn’t have time to go through composer so instead, I created a cron job and put the following commands in:

/usr/local/php7.4/bin/php /home/www/ setup:upgrade
/usr/local/php7.4/bin/php /home/www/ setup:di:compile
/usr/local/php7.4/bin/php /home/www/ setup:di:compile

Once the cron jobs have run, you can simply delete the jobs and your magento install would have been upgraded.

Filed under: Blog

No comment yet, add your voice below!

Add a Comment

Your email address will not be published. Required fields are marked *

Comment *
Name *
Email *

This site uses Akismet to reduce spam. Learn how your comment data is processed.