Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Bekzod's avatar

Laravel deployment

Hello everyone. It is my first deployment and I would like to deploy my laravel app on shared hosting. But, on development mode I have to run these commands :

-php artisan queue:work

-laravel-echo-server start.

And I want to use pm2 in order to run these commands. And I cant understand : in the process of deployment when I should run pm2 commands? How can I deploy my project, Is there any step by step guidance? please help. Thanks in advance) sorry for my poor english. P.S: I use windows.

0 likes
1 reply
pardeepkumar's avatar

Installing Laravel 5 on shared hosting

First connect to hosting via SSH

Second install composer then in cpanel open Select PHP version and choose 5.x. (I also set phar extension) then next, install laravel: php composer.phar create-project laravel/laravel myproject --prefer-dist

copy everything from myproject/public to public_html

open public_html/index.php and set:

require DIR.'/../myproject/bootstrap/autoload.php';

$app = require_once DIR.'/../myproject/bootstrap/start.php';

And on Cloud Hosting

Host you Laravel application on few steps

https://www.cloudways.com/blog/install-laravel-on-digitalocean/

Please or to participate in this conversation.