Laravel storage link won't work on production

There are several reasons why the Laravel storage link may not be working on production. Some common issues include:

  1. The storage folder may not have the correct permissions. The storage folder and its contents should be writable by the web server.

  2. The storage link may not have been created. In order to use the storage link, you must first create it using the command php artisan storage:link.

  3. The server may not have the correct PHP extensions enabled. Laravel requires the PHP extensions fileinfo and mbstring to be enabled.

  4. The config/filesystems.php config file may not be configured correctly. Ensure that the disks array is configured correctly and points to the correct storage location.

  5. The server might be running with different user and group permission that the one used in your local environment. Make sure the user and group permission of the storage folder on the server match the one on your local environment.

Watch a course Learn object oriented PHP

It's important to check the logs for any error message and also ensure that the server you're running on is compatible with the version of Laravel you're using.