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

ecarl's avatar
Level 1

laravel file size 1.85gb

Hello, I created a new Laravel project, but the file size of the new project is 1.85GB. Is this normal?

0 likes
21 replies
jlrdw's avatar

I would say no, one of mine is 47.3 MB. Has some of your logs grown huge?

1 like
ecarl's avatar
Level 1

@jlrdw I have just created the project; it's a fresh one. I am just starting to develop a new app. Could it be an issue with Laravel 10?

Snapey's avatar

Your file should exclude the vendor and node_modules folders since you can re-install these at any time.

Your 'file' might include

  • a lot of uploaded files in storage
  • a lot of log files
  • a large amount of cache
  • a large .git history
1 like
ecarl's avatar
Level 1

@Snapey I just created a new Laravel project. I am just starting to develop a new app. Maybe this issue is from Laravel 10?

ecarl's avatar
Level 1

@Snapey I couldn't find my npm_modules folder. However, I checked my vendor folder and found it to be 1.84 GB in size. Under the vendor folder, this is the top folder with a large file size.

  • sebastian folder = 975MB
  • phpunit folder = 466MB
  • laravel folder = 234MB

I was curious how it grew to be so big given that it is a fresh Laravel project.

Lopsum's avatar

That's strange, on a fresh installation of Laravel 10 with composer create-project I have a vendor folder of 47,5mo. What tool did you use to install Laravel ?

ecarl's avatar
Level 1

I resolved the issue by reinstalling the composer and running "composer create-project laravel/laravel example-app" once again. It is now 47mb

gouravjoshi's avatar

@Snapey I'm encountering a persistent issue with my vendor folder, which has ballooned to 2.09GB in size for a new project. I initiated the project using the command 'composer create-project laravel/laravel example-app.' Despite reinstalling Composer, the problem persists. I've attempted to resolve it by deleting the vendor folder and running 'composer install' again, but the process still takes an excessive amount of time and downloads 2.09GB of data.

gouravjoshi's avatar

Yes, now it worked! After running the commands 'composer clear-cache' and 'composer config preferred-install dist,' I encountered an error for each dependency, prompting me to enable the .zip extension in the php.ini file. Once I enabled it, everything worked perfectly fine. Thanks for your guidance!

1 like
Sgk's avatar

@gouravjoshi Hey I'm having this issue too for some reason my vendor file 2.12gb making my project 2.17gb even though its a really simple and small project, I tried using 'composer clear-cache' and 'composer config preferred-install dist' but it did not resolve the issue , do you have any other tips on this? Please let me know as soon as possible

CodeYellow's avatar

@gouravjoshi It worked! As I freshly installed my Xampp, the "zip" extension was disabled. After enabling and running command 'composer clear-cache' it worked. Thank You.

MrJeff's avatar

@Sgk Make sure that you have the correct extensions enabled in ur php.ini, I didn't have the zip extenstion and after enabling it and deleting the vendor folder and running "composer install" I went from 2.5Gb to 50mb.

Tito28's avatar

Fresh install composer with install first laravel 11 takes about 3.5 GB with phpunit tests in 2.3Gb. Creating new projects after takes 51MB. So, fresh install makes full installation, next time like basic.

Snapey's avatar

@Tito28 Should be under 100mb

Make sure you have the php zip extension installed

blpcsolutions's avatar

Yes, the file size of a new Laravel project can be quite large, especially if you're using a lot of dependencies or have a lot of assets.

noobda's avatar

if you are getting this error " The zip extension and unzip/7z commands are both missing,", while creating a new project then you should copy the path it is showing along with the error which is like "C:\xampp\php\php.ini" paste this in search bar and remove ; infront of zip extension and boom from 3 GB to 200 mb . this is for windows

Please or to participate in this conversation.