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

apanjaluu's avatar

How To Deploy Laravel project on server

Hi Everyone, I'm Newbie Here Do u can help me for solve this problem I'm using laravel 9 with tailwindcss framework I'm having trouble when I want to deploy it to cpanel I don't know how to make the correct server.js to connect to laravel project. Thanks!!

0 likes
3 replies
matheusronanabel's avatar

Hi! Did you follow the server requirements and instructions on the documentation? You can find the "Deployment" section on the documentation.

And don't forget to run this command before deploying, this command should compile all your css and javascript for deployments:

  • npm run build
apanjaluu's avatar

@matheusronanabel hi, can I deploy to the server without having to use the node js setup from cpanel after using npm run build ?

matheusronanabel's avatar

@apanjaluu I've tried it before on Siteground, and it works perfectly fine. Even until now I still use the good old cPanel to deploy most of the websites that I built.

Please or to participate in this conversation.