Laravel clear cache file manually if command not supported

When we migrate local file to online server. Laravel cache stored on local cached file also migrated. So this cache will look over the cache defined file but would not get local file location and gets an error like.



If server allow us to run command

the commad for clear cache is:

$php artisan config:cache

$php artisan config:clear

but we don’t access command line any type of server so that  we need remove file which are getting us problem to recreate cache file are located on.

Manual Remove Cache file(Server automatically generate new file with the location):


there are






so we need remove it manually then load site, the site are working properly from now.



Add some clear config command with our route. then run the clear command but hitting url also be the fine solution to remove cache files.


Route::get(‘/clear-cache’, function() {
return”Cache is cleared”;

put these code into you route/web.php

and run from web url <your-domain>/clear-cache

it will works perfectly.



Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment