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?
Asked
Active
Viewed 7,892 times
3
-
may be by deleting unwanted files? – Cerlin Jan 04 '17 at 12:42
-
compress the folder. – Sanzeeb Aryal Jan 04 '17 at 12:42
-
Use some disk utility to scan the folder and see which files are taking more space and then decide if you wanna compress or move those files to a separate repo. – Cerlin Jan 04 '17 at 12:59
-
1Check for a .GIT folder (it will be hidden so you need to show hidden folders). This was a culprit for me previously and was about 215MB, I wasn't using GIT so deleted it out. – just_chris Jan 04 '17 at 13:03
-
@just_chris thanks you so much .GIT folder size is more than 250mb – sandip kakade Jan 04 '17 at 13:15
-
@dhanashri you said `public` directory is 230 Mb too. – Alexey Mezenin Jan 04 '17 at 13:21
-
@AlexeyMezenin yes but .GIT folder was hidden and folder size more than 250mb – sandip kakade Jan 04 '17 at 13:30
-
Well, the problem is still in `public` directory. You need to find out what exactly files in `public` directory is the cause and add these to `.gitingore`. I mean you can't just stop using GIt or add whole `public` directory to `.gitignore`. – Alexey Mezenin Jan 04 '17 at 13:35
2 Answers
2
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.

Community
- 1
- 1

Alexey Mezenin
- 158,981
- 26
- 290
- 279
-
looks like he has manually deleted the cache and still the package is of 535 MB – Cerlin Jan 04 '17 at 12:44
-
Well, I bet the problem is in temporary or converted uploaded video files, but maybe other ways to delete temporary files like logs and cache will also be helpful. – Alexey Mezenin Jan 04 '17 at 12:47
-
@AlexeyMezenin i tried what you suggest artisan only 15mb folder size decrease – sandip kakade Jan 04 '17 at 12:50
-
Did you check `public` directory? You said you're uploading video files. – Alexey Mezenin Jan 04 '17 at 12:55
-
@AlexeyMezenin Yes I checked `public` directory and size is 230mb – sandip kakade Jan 04 '17 at 13:08
-
I mean check what files in this folder take so much space. If it's temporary files, just delete them. – Alexey Mezenin Jan 04 '17 at 13:10
1
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)

Marcin Orlowski
- 72,056
- 11
- 123
- 141

Ali Ali
- 1,756
- 2
- 15
- 34