How to save .env file in windows? How to save .env file in windows? windows windows

How to save .env file in windows?


If you use Windows, to save any file with an extension different from the default extension of the tool you are using, You have to select the option which appears like:

All Files or All Files (*.*) in the Type of File dropdown in the save dialogs.


Open your xx.env file with notepad++ and file -> saveas -> rename to .env and save


In windows normally you can not create a file without name. So to create a .env file there are three ways I know...

  1. Copy paste from somewhere else
  2. If you have installed php then run this command in console php -r "copy('anyfile.example', '.env');"
  3. Create a txt file called anything.txt open CMD and find its dir then run ren anything.txt .env