DEV Community

Cover image for Easy Ways to Run PHP Artisan Commands on Shared Hosting
Hilmi Hidayat
Hilmi Hidayat

Posted on • Updated on

Easy Ways to Run PHP Artisan Commands on Shared Hosting

Read more at Codelapan.com/post/run-php-artisan-commands-on-shared-hosting

Top comments (2)

Collapse
 
victorrims68524 profile image
Rimsha Victor Gill

Great article on running PHP Artisan commands on shared hosting. It can be challenging without terminal access. However, there are a few methods you can try:

Using Routes: Create custom routes in your Laravel application that trigger the execution of Artisan commands when accessed.

Cron Jobs: Set up cron jobs on the shared hosting server to schedule and automate the execution of Artisan commands at specific intervals.

Artisan UI Package: If your PHP version is 8 or higher, consider using the artisan-ui package by Lorisleiva. It provides a web-based interface for running Artisan commands.

Make sure to consult your hosting provider's documentation or contact their support for specific guidance on running Artisan commands in a shared hosting environment.

Collapse
 
arxeiss profile image
Pavel Kutáč

If you want to run also worker on shared hosting, you can use this nice library: github.com/orobogenius/sansdaemon