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

lindstrom's avatar

Envoyer Fails to Include Contents from Data Directory Under Storage

I just started an Envoyer trial and am trying to get my deployment squared away. The problem I'm having is that I have a data directory under /storage that contain a number of files used to build the database when it is first migrated. However, upon deploy Envoyer gets the directory but none of the contents.

In my case I my structure is /domain/envoyer/current. Withing /envoyer I see the storage/data directory but it's empty. The /storage folder is symlinked to /current. So, everything looks good. I confirmed that the contents of /storage/data exist within master on Bitbucket.

The only thing that could be messing with this is that Bitbucket has been having some network issues over the past couple of days. However, everything else from the clone down to the server seems fine. I did send a support request, but ZendCon was this week and Taylor may stil be tooling around in the Lambo.

0 likes
1 reply
lindstrom's avatar
lindstrom
OP
Best Answer
Level 15

Taylor, who heroically answered my support ticket at 11:20PM on a Friday had this to say:

"Anything you need to store in storage I would put in the "storage/app" directory. That is the folder structure that Laravel ships with out of the box and is generated by Envoyer. Any other custom folders in the storage directory above that will need to be created manually on the server."

In my "special" case, I had to move the folder containing my reference data to the project root. The reason is that, once deployed, Envoyer sets up a /storage folder that maps to the Laravel structure one level below the /current directory and creates a symlink. When Envoyer pulls down the release, it deletes the storage directory from your repo. The reason for this is so that you can have one consistend location for things like logs or cached files/sessions AFTER you are up and running.

So, long story short, on Envoyer the linking of storage is a production convenience for your consistent storage needs. If you have data needed in a migration, you need to store it elsewhere.

Of course, this is explained perfectly starting around 1:55 here if you actually watch and listen: https://laracasts.com/series/envoyer/episodes/2

2 likes

Please or to participate in this conversation.