Support the ongoing development of Laravel.io →
posted 4 years ago
Views Laravel
Last updated 2 years 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

jaaf, mahbuburriad, wmandai, owentechke, valexdevelopers liked this reply

5

@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.

mahbuburriad liked this reply

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!

Eventy

Your banner here too?

José Fournier jaaf Joined 30 Aug 2020

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.