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 skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk