Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why my Laravel project folder size is too big?

After finishing my project, I checked the project folder size and it was more than 550mb. I tried to delete the cache from the project but the folder size was still more than 535mb. I'm using the AdminLTE theme for the admin panel in my project and I uploaded some videos. The Public folder size is 230mb and the entire project folder size is more than 500mb. How can I reduce my folder size?

like image 204
sandip kakade Avatar asked Oct 22 '25 17:10

sandip kakade


2 Answers

You can try to clear all Laravel cache with these commands:

php artisan cache:clear
php artisan route:clear
php artisan config:clear
php artisan view:clear

Then clear all logs and temporary (uploaded and other) files inside storage directory.

Also, find out what are these files in a public directory. Maybe it's some temporary images.

like image 102
Alexey Mezenin Avatar answered Oct 24 '25 09:10

Alexey Mezenin


In addition to clearing the cache. You can get rid of the vendor/ folder from your project which contains the used libraries, which can be re-loaded by running the

composer install

Note: this option applies Only if you're planning to send your project to someone and not for going online.

Another solution, you can use online hosting for your videos like Vimeo instead of storing your videos within your project folder. (Note: this option applies Only if your project online)

like image 21
Ali Ali Avatar answered Oct 24 '25 09:10

Ali Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!