Recreate storage directory

How can I recreate the storage directory after a series of unfortunate f-k ups.

I had some hiccups upgrading Invoice Ninja recently and I saw on the forum I could just unzip the upgrade file and replace the current contents. I missed the part about using the file instead of the file and overwrote my .env file.

Then I blew the whole thing away, unzipped the file again and restored the .env file from a backup. That seemed to work so I called it a night until a week later when I tried to make an invoice and found I couldn’t. I got a “500: file_get_contents( failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found)” error.
That’s when I found out I need to keep the .env file and the storage directory safe. Backups have since moved on so I can’t get the storage directory from there.

How can I recreate the files in it to allow me to generate invoices again?

@david do you have any advice?


You’ll want to make sure /public/storage directory is available.

You’ll also want to re-upload your company logo.

Thank you @david, I tried that and even set the permissions to 777 in case it had permission problems but I still got the same error. I ended up reinstalling then restoring the DB and .env file and everything is apples now.