Also called: cache:clear, optimize:clear, route:cache
In plain English
After changing .env on the server, run them again; otherwise the old values stay cached. optimize:clear removes every cache when something behaves strangely.
Example
I changed .env on the server but forgot to run config:cache, so nothing changed.
In code
php artisan optimize # config, routes, views
php artisan optimize:clear
Learn more
- Deployment: optimizationLaravel docs (opens in a new tab)
- Configuration cachingLaravel docs (opens in a new tab)
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30