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

jrean's avatar

.gitignore

Hi,

By default Laravel ships with /vendor within the .gitignore file.

Is it also a good practice to include /storage within the .gitignore file and so exclude the /storage folder and sub-folders to be committed and deployed? (By default within the /storage folder there is a .gitignore file that exclude laravel.log)

From my point of view the storage folder is relative to one environment so when I deploy to my stagging/testing server or even to production I don't want to send the /storage folder and sub-folders..

I would appreciate if you can give me some good "teaching" about this.

0 likes
3 replies
pmall's avatar
pmall
Best Answer
Level 56

As you mentioned it there is .gitignore files into the storage subfolder. So the files it contains are environment specific. I think the whole storage structure is not ignored because it is essential to makes the application works.

1 like

Please or to participate in this conversation.