Support the ongoing development of Laravel.io →
Views Laravel
Last updated 3 months ago.
0

Did you "php artisan storage:link" on your production server, too?

0

On your deployment server if have folder 'public/storage' please delete first (dont worry its linked folder if you earlier use storage:link on developemet environment)

write this code in routes/web.php

Route::get('/create-symlink', function (){
    symlink(storage_path('/app/public'), public_path('storage'));
    echo "Symlink Created. Thanks";
});

Then run this route from browser `https://yourdomain.com/create-symlink' Then your problem will be solved.

There is alternative way if you have permission to use terminal. On your deployment server if have folder 'public/storage' please delete first (dont worry its linked folder if you earlier use storage:link on developemet environment)

Then run a php artisan command

php artisan storage:link
3

@jetwes : Thanks. I did that many times without fixing my problem.

@Mahbubur Riad : Thanks. Before reading your answer I deleted the public/storage folder and run php artisan storage:link from the command line and it fixed it. Your answer will be useful for people that do not have a ssh access to their hosting.

1

@jose Fournier - Thanks. Thats why i gave you both solution. use as per your solution. Please mark this page solved.

0

Sign in to participate in this thread!

Cloudways

Your banner here too?

José Fournier José Fournier jaaf Joined 30 Aug 2020

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2022 Laravel.io - All rights reserved.