Categories
Laravel Samuel

Laravel Deployment Commands

This is just a helpful reminder list of commands to run when deploying code for a Laravel project:

composer update
npm install
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan config:clear

when running php artisan cache:clear if you see the error:

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

The data directory most likely doesn’t exist under (storage/framework/cache/data),

This data directory doesn’t exist by default on a fresh/new installation.

Creating the data directory manually at (storage/framework/cache) should fix this issue.