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

r123's avatar
Level 3

How to generate .env file and APP_KEY after downloading a Laravel project from GitHub?

Because .env is included in .gitignore you don't get it when you clone a project from GitHub.

Is there a way to generate the .env file with APP_KEY via some command without manually creating it (copy paste)?

0 likes
3 replies
toughskin's avatar

@NICKEYGOD - Such a simple and obvious way to do this (I cannot figure out why I did not think of this)... thank you.

Eeetm's avatar

open terminal in your project folder

cp .env.example .env
2 likes

Please or to participate in this conversation.