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

catalin12's avatar

php artisan storage:link what it does?

I need to mimic the behavior of this function by hand because I have no access to the CLI on the live server. Any help?

0 likes
6 replies
Tray2's avatar

It creates a symlink to your storage folder so that you can access it easier.

catalin12's avatar

is there a way for me to make it on a server (Linux) without CLI access?

tykus's avatar

The symlink makes files stored in the storage directory accessible from the web. You can change the local disk config (in config/filesystems.php) to a public path rather than the storage_path()

Tray2's avatar
Tray2
Best Answer
Level 73

You should be able to do an artisan call in a method.

Artisan::call('storage:link'); 
1 like
catalin12's avatar

This is the solution. I finally found how the previous guys did it. (this is not my project, I just get it under maintenance).

Please or to participate in this conversation.