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

mferry's avatar

Framework Install / Production System ?

Folks,

I am doing a hosting project for a customer and they are having their website built using the laravel framework. The developers have it installed on the development stations.

Do I need to install it on the production servers? Or just use all the content it creates in the public_html folder on the development box ?

I have apache and PHP running on the production box. There is a shared MySQL server for all the production web servers to use.

Articles I read tell you how to install laravel to create your website/application, but this is POST development... Is it needed to be installed on the production servers ?

please advise.

0 likes
3 replies
xopa's avatar

Firstly Laravel has a public/ folder that should be the webroot of the app, that means if your servers structure is something like this: /home/mysite.com/public_html then you could do with uploading the app to /home/mysite.com and taking a look at https://laracasts.com/discuss/channels/general-discussion/where-do-you-set-public-directory-laravel-5 or altering your Apache config to point to public/ instead of public_html/

A general deploy looks something like this:

  • Upload the files
  • Run composer install
  • Run npm install && gulp --production (if they're not compiling their assets locally)
  • Configure the environment in %project_path%/.env (see .env.example)
  • Run database migrations (php artisan db:migrate)
mferry's avatar

Lets say for example....I don't have composer or laravel framework installed on the production server.

Those are installed on the development server setup. They are using BitBucket to store their code.

On the production server if I Pull the code down. Everything from the Application directory including the "public" folder.

Then have apache use that public folder as its document root.

Would this work?

I really don't wnat to run framework commands on the production system. All framework or files needed are under the application directory correct ?

Thanks.

Please or to participate in this conversation.