Support the ongoing development of Laravel.io →
Configuration

Hello

In the manual I am getting confused as to how to distribute the content in the files .env.local.php and .env.php

In the Database configuration I have this


'mysql' => array(
			'driver'    => 'mysql',
			'host'      => 'localhost',
			'database'  => $_ENV['DB_NAME'],
			'username'  => $_ENV['DB_USER'],
			'password'  => $_ENV['DB_PWD'],
			'charset'   => 'utf8',
			'collation' => 'utf8_unicode_ci',
			'prefix'    => '',
		),


Then in the .env.local.php file I have this


return array(
    
    'DB_NAME'=>'sdsfm',
    'DB_USER'=> 'sfdsdf',
    'DB_PWD' => 'sdfsdfsdd3',
    'ENC_KEY'=> 'sdfsdfsdsddderqfq1f1qmk1fxt2a8g'
    
    
);

but then it still tells me to create yet another file called .env.php

where I am supposed to enter

On your production server, create a .env.php file in your project root that contains the corresponding values for your production environment

But:

Haven't I already entered those data in the .env.local.php file?

thank you

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.