0

I want to make multiple laravel projects for my task in university. But i have a problem with my disk capacity, i have very little space.

vendor folder is taking much space of my disk, and every laravel project use the same vendor folder without editing them. And I thought i could use the same Vendor Folder to reduce my disk consumption, but i don't know how to do that.

Is this even possible?

Thanks

1
  • 1
    You could use symlinks probably Commented Jan 5, 2018 at 14:16

1 Answer 1

2

You can simply create symlinks in each project except whatever the main one is that actually has the vendor directory.

cd /var/www/SiteA
composer install

# create new project into /var/www/SiteB
cd ../SiteB

# If vendor directory is already there, delete it: rm -rf vendor
# create symlink to Site A's vendor directory
ln -s /var/www/SiteA/vendor

It's just Linux commands and tricks.

Sign up to request clarification or add additional context in comments.

4 Comments

is this should using command line to run it? bcoz my cpanel doesn't have command line.
Yes. it's a linux command @James ... is there any SSH in your panel ?
yes, there is. but my provider block it. i can't access my ssh using private keys. it always say Network error: Connection time out
You have many ways to create symbol links ... check this link namecheap.com/support/knowledgebase/article.aspx/9561/29/… and you can also accept the answer :) @James

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.