When working with Laravel, caching plays a key role in improving your application’s performance by storing compiled configurations, routes, views, and other data. However, during development or after making changes, you may need to clear the cache to see your latest updates.
Usually, developers use Artisan commands like php artisan cache:clear or php artisan optimize:clear. But what if you don’t have terminal access, or you want to clear cache manually?
This guide explains how to clear Laravel cache without any command, simply by deleting cache files from specific folders.
🗂️ Understanding Laravel’s Cache Locations
Laravel stores different types of cached data in various directories inside the storage and bootstrap folders. Here’s a quick overview:
| Cache Type | File Location |
|---|---|
| Application Cache | storage/framework/cache/ |
| Compiled Views | storage/framework/views/ |
| Sessions | storage/framework/sessions/ |
| Config Cache | bootstrap/cache/config.php |
| Route Cache | bootstrap/cache/routes.php |
| Event Cache | bootstrap/cache/events.php |
To clear the cache manually, you need to delete these files and folders safely.
🧾 Step-by-Step: Clear Cache Manually
1. Delete Cached Files
Using your File Manager or FTP client, open your Laravel project directory and navigate to:
storage/framework/cache/
storage/framework/views/
storage/framework/sessions/
Now, delete all files inside these folders (but do not delete the folders themselves).
If you’re using a terminal, you can run these commands:
rm -rf storage/framework/cache/*
rm -rf storage/framework/views/*
rm -rf storage/framework/sessions/*
2. Delete Config and Route Cache Files
Next, go to the bootstrap/cache directory and remove any cached files:
rm bootstrap/cache/config.php
rm bootstrap/cache/routes.php
rm bootstrap/cache/events.php
If you’re doing it via File Manager, simply delete those files manually.
