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

kfc's avatar
Level 1

how to publish laravel to the public ?

I've searched for how to publish a Laravel project online, but didn't find any that explains how to get the files you need, i don't want to upload 16k+ files to my webserver or whatever. i saw someone on GitHub uploaded the files he needs here is the link to it :https://github.com/cyavu/AlbionCraftCalculator/tree/main/root

0 likes
2 replies
colbyalbo's avatar

You only need to deploy the application files, not the vendor or node_modules (which is what i assume you are referring to by 16k+ files).

A very common way to approach this is to use your github repo to deploy from ; this way you can use the git_ignore file to restrict uploading of files that aren't supposed to be involved in the deployment pipeline (ie the .env file, node_modules etc). There are many ways to set this deployment pipeline; Look into Laravel Forge - there's a course here on Laracasts.

Snapey's avatar

on your server, git pull your project (source files) then run composer install to get the vendor folder and then npm install and npm run production

Please or to participate in this conversation.