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

sazr's avatar
Level 1

Deploying Laravel: Does it have to be so hard? Will this idea work?

We're in the stages of deploying/redeploying a Laravel project and its quite hard and complex. I'm thinking of making an easier way to setup our Laravel project on the server. Essentially it's just to change the /home/user/public_html to a symbolic link. So now /home/user/public_html really points to /home/user/MyLaravelProject/public.

This way deploying a Laravel project simply involves uploading the project to a new folder and creating the symbolic link (aswell as the standard composer and artisan commands). And updating a Laravel project means we don't have to constantly copy our front-end files into /home/user/public_html whenever we make a change.

This way we don't need to change the paths in the bootstrap/app.php, public/index.php, etc. files.

Has anyone done this or know if it will work? Any ideas why this wont work? Any tutorials out there that walk us through this?

Relevant information about our server:

  • CentOS 7
  • VPS
  • With GoDaddy
  • Setup by previous developers rather badly
0 likes
3 replies
codenex's avatar

Deploying with Laravel isn't hard. The problems your are facing is with the tools that you choose to use. Anyway what you should be figuring out is how to modify your vhosts or server block to set the document root appropriately.

WebKenth's avatar

One word

Forge

It takes all the trouble away and provides nice tools for the optimal deployment

While it might not be possible for you to switch right now i would highly suggest you use it for future projects.

I usually make forge listen on a master branch for the production site and then create a mini server for staging listening on a dev

That takes care of any hassle of deploying new code as it only requires a click of a button after a git push, or if you turn on auto-deploy all it takes is a push for it to update automatically

Please or to participate in this conversation.