Mohsen's avatar

Modify .env file on remote server

Hi I uploaded my project on host but I forgot to set correct data in .env file . then I modify .env and set correct data and upload it again. but previous configuration on .env remains. what is the problem?

0 likes
6 replies
tykus's avatar

.env is not in version control by default, so it will not be included in any commit/push/pull. You would need to ssh onto the server and write a .env file there instead; or you can create actual environment variables on the server

jldrw will be along shortly to tell you that .env is not meant for a production environment - it's one of his "things"

Mohsen's avatar

My host is shared host and I cant Ssh onto server

SmoDav's avatar

Double check that you placed the file in the root application folder and not the public folder

Mohsen's avatar

its in the root application folder

tykus's avatar
tykus
Best Answer
Level 104

Did you run php artisan config:cache during development?

Is there a {app route}/bootstrap/cache/config.php file on the production server? Delete it.

2 likes

Please or to participate in this conversation.