Voyager: Where to create storage symbolic link

Created on 15 Oct 2017  路  9Comments  路  Source: the-control-group/voyager

  • Laravel Version: #5.4#.#
  • Voyager Version: #0.11#.#
  • PHP Version:
  • Database Driver & Version:

Description:

where to create voyager storage link inside /public_html directory, where I have public folder at root and all other files inside /public_html/project folder

Steps To Reproduce:

Most helpful comment

Hello Everyone I have this issue and solve it this way.
On linux/debian :
1- go the public folder and remove storage folder
2- re-create the symlink : php artisan storage:link

On windows :
1- install git for widows and with git-bach
2- go the public folder and remove storage folder
3- re-create the symlink : php artisan storage:link

And it solve all problem

Alternatively for windows , you can just remove the storage folder and use windows commande to recreate the symbolic link. exemple ( Mklink /d ...pathpublicstorage ...pathstorageapppublic ).
But i never try this out.

god bless you all.

All 9 comments

domain.com should point to /public_html/project-folder/public

Then there should be a symlink in your public folder, something like this:
./storage -> /home/username/public_html/project-folder/storage/app/public

The goal is to have domain.com/storage point to your user folder behind your laravel public folder

I have created storage link inside /public_html directory because at shared hosting we place public folder content at root but still it not working

Your install is not ideal. There are numerous blog posts that talk about how to do it, though they differ, and many are insecure. This method is the ideal way to do it, and would alleviate your issues: https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e

Hello Everyone I have this issue and solve it this way.
On linux/debian :
1- go the public folder and remove storage folder
2- re-create the symlink : php artisan storage:link

On windows :
1- install git for widows and with git-bach
2- go the public folder and remove storage folder
3- re-create the symlink : php artisan storage:link

And it solve all problem

Alternatively for windows , you can just remove the storage folder and use windows commande to recreate the symbolic link. exemple ( Mklink /d ...pathpublicstorage ...pathstorageapppublic ).
But i never try this out.

god bless you all.

thx it helped.

@ismaeljoseph You just saved a life, thanks a Thousand...

I have this issue in cpanel hosting and i didnt see any option to solve it

I have this issue in cpanel hosting and i didnt see any option to solve it

Try this, it helped me in a project.

public function symlink()
{
$target = '/home/your_server_name/public_html/storage/app/public';
$shortcut = '/home/your_server_name/public_html/public/storage';
symlink($target, $shortcut);
}

That symlink function does nothing that artisan storage:link doesn't already do. Also, your laravel install should NOT be under public_html for security reasons.

As for cpanel, if you don't have terminal access, you're better off looking for a host that does.

This issue has been closed for ~18 months and was for a MUCH older version. Please don't comment on such old issues, especially when they have nothing to do with Voyager.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TPRAsh picture TPRAsh  路  3Comments

Nagendra1421 picture Nagendra1421  路  3Comments

kevinjon27 picture kevinjon27  路  3Comments

vaggelis2018 picture vaggelis2018  路  3Comments

TXRRNT picture TXRRNT  路  3Comments