Menu

Post image 1
Post image 2
1 / 2
0

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

DEV Community·Fatima Fatima·21 days ago
#NgVUbl96
#laravel#devops#linux#php#storage#cpanel
Reading 0:00
15s threshold

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…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More