Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mDelshad's avatar

problem this storage:link in shared hosting

i'm use the Shared hosting and because i'm do not have access to ssh , can not run the following command

php artisan storage:link

Can this command be done locally and then upload the project to the host?

0 likes
6 replies
Ty's avatar

You can do it with a cron job.

* * * * * ln -s /home/user/laravel/storage/app/public /home/user/public_html/storage
2 likes
jsonkenyon's avatar

@MDELSHAD - Correct, if you don't have SSH access you wont be able to run that command so you have to do it another way. Uploading files wont preserve your symlinks. Doing what @ty has suggested should allow you to do it also. Running that cron will run as a command via your user on shell. However, once it is symlink'd you would want to remove that cron.. Though if you don't mind me asking who is your host?

1 like
jsonkenyon's avatar

@MDELSHAD - Sorry, was referring to the hosting company you are using. Just courius really, as I know most shared hosting now allows ssh, though it's jailed.

1 like

Please or to participate in this conversation.