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

vm's avatar
Level 2

laravel forge how to upload vendor files

I am using Laravel Forge and my application is not deploying. Unfortunately Jeffrey's videos are quite out of date now. Hope somebody can help. Here is what I get

Warning: require(/home/forge/default/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/forge/default/bootstrap/autoload.php on line 17

my .gitignore is like so

/bootstrap/compiled.php
/vendor
composer.phar
composer.lock
.env.*.php
.env.php
.DS_Store
Thumbs.db

tests/_output/*
tests/_output/*

The sighted line 17 in bootstrap/autoload.php is

require __DIR__.'/../vendor/autoload.php';

I understand that since the vendor path is in my .gitignore those files are not added to my github repository -- this is how it is in laracast Forge-Demo also

So how does the vendor directory get uploaded to the server

Hope somebody can help

Thx

0 likes
4 replies
bashy's avatar
bashy
Best Answer
Level 65

The vendor folder should not be uploaded to the git repo. Instead, you either do

composer update

// OR

composer install

To do the install one, you will need to copy your composer.lock file to the git with it being updated on your local dev files.

2 likes
vm's avatar
Level 2

When I removed composer.lock from .gitignore and did a commit and push everything ok -- Thx

2 likes
CloudEdwards's avatar

Thanks so much Bashy you're here to to save the day again. This worked for me as well with removeoing composer.lock from git.ignore and quick deploy. How my word Forge is just such a pleasure,, now I can get back to developing

Please or to participate in this conversation.