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

ziben69's avatar

Path to custom storage directory L5.8

Hello guys, I have other directory structure than default. I have public's folders and files in root directory and the rest in a custom folder. How can I change storage path to custom directory. I have in root directory "storage_custom" folder which that stores files. I tried to change filesystems local path but doesn't work. Any tips to change path to storage folder? Thanks

0 likes
2 replies
Elliot_putt's avatar

I recommend you stick with Laravels default storage structure and then base your other custom folders inside the default storage folder. Why do you want to make a different storage folder?

frankforte's avatar

It would help to have file storage in a different drive, especially when using something like gluster. Having it outside of the root Laravel application directory also allows the files to be used or shared by different versions of the application (e.g. if you offer a beta website for some users). It can also help for multi-tenant applications, to specify a different root storage path for each tenant. The following appears to work:

app()->setStoragePath('/custom/path/to/storage')

Please or to participate in this conversation.