close

Laravel storage link won’t work on production

Hello Guys, How are you all? Hope You all Are Fine. Today we are talking about Laravel storage link won’t work on production in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

Today we are talking about Laravel storage link won’t work on production in php.

  1. How To Solve Laravel storage link won't work on production Error ?

    To Solve Laravel storage link won't work on production Error delete folder storage From public and run this Command in Cron Job [ one time ]
    ln -s /home/public_html/storage/app/public/home/dev5/public_html/public/storage

  2. Laravel storage link won't work on production

    To Solve Laravel storage link won't work on production Error delete folder storage From public and run this Command in Cron Job [ one time ]
    ln -s /home/public_html/storage/app/public/home/dev5/public_html/public/storage

Solution 1

I see that the question has been answered but I want to suggest another solution which i found to be easy. Go to the route folder your-app-folder/routes/web.php and register a new route as follows

Route::get('/linkstorage', function () {
    Artisan::call('storage:link');
});

then go to your website www.example.com/linkstorage and it will take you to a blank page. that’s it. The storage folder will be create. I hope it helps someone.

Solution 2

delete folder storage From public and run this Command in Cron Job [ one time ]

ln -s /home/public_html/storage/app/public/home/dev5/public_html/public/storage

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment