DEV Community

Cover image for Laravel storage:link Not Working on cPanel? Images Missing After Deploy
Fatima Fatima
Fatima Fatima

Posted on

Laravel storage:link Not Working on cPanel? Images Missing After Deploy

Laravel storage:link Not Working on cPanel? Images Missing After Deploy

I recently deployed a Laravel project to shared hosting using cPanel, and suddenly all uploaded images disappeared.

The strange part was:

  • everything worked locally on Windows
  • images physically existed on the server
  • but production kept showing broken image icons and 403 Forbidden errors

At first, I thought the issue was related to:

  • Blade templates
  • image uploads
  • Laravel storage
  • or browser cache

But the real issue turned out to be related to:

  • symbolic links (storage:link)
  • Linux permissions
  • Apache restrictions
  • and shared hosting security settings

Some useful debugging steps included:

```bash id="d7u0f0"
php artisan optimize:clear




and:



```bash id="d5m7kc"
chmod -R 775 storage bootstrap/cache
Enter fullscreen mode Exit fullscreen mode

I also had to manually inspect:

  • .htaccess
  • symlink targets
  • and direct image URLs

The issue became even more confusing because:

  • old images sometimes worked
  • new uploads failed
  • and direct URLs returned 403 Forbidden

I documented the full debugging process and final solution here:

https://growthawakening.com/single-post/laravel-storagelink-not-working-on-cpanel-images-missing-after-deploy

If you're deploying Laravel on shared hosting and images suddenly disappear, this may save you hours of debugging.

Top comments (0)