Why my Laravel project folder size is too big?

9k views Asked by At

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?

2

There are 2 answers

6
Alexey Mezenin On

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.

0
Ali Ali On

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)