Laravel

Upgrade Laravel 5.6 to 5.7 – Failed to clear cache

I upgraded my app from Laravel 5.6 to 5.7 by following official upgrade guideline.

After upgrade production crashed, and upon running php artisan cache:clear artisan threw the following error:

Failed to clear cache. Make sure you have the appropriate permissions.

Some googling, and I figured out why it was happening.

If you install laravel now, you will get storage/framework/cache/data directory automatically so you don’t have to create it. They leave this directory to allow the filesystem to cache.

That’s mean when upgrading system doesn’t find storage/framework/cache/data  , by creating this folder with correct permissions problem will be solved.

Once folder is created run php artisan cache:clear

That’s all.

Author: Danyal
I'm a skilled programmer specializing in Vue.js/Nuxt.js for front-end development and PHP Laravel for back-end solutions. I have a strong focus on API design and development, complemented by experience in web server setup and maintenance. My versatile expertise ensures seamless creation and maintenance of web applications, covering everything from intuitive user interfaces to robust server-side functionality. Passionate about coding and driven by a lifelong learning mindset, I invite you to explore more at danyal.dk.