I have worked on some Magento 2 Projects, the main problem is when I pull every Magento 2 projects from git and load the project in the browser it always asks me to do the fresh installation, even after I configure the app/etc/env.php and the database properly

  • Have you copy working project env.php file ? May 9, 2018 at 4:50
  • @NikunjVadariya yes
    – mileven
    May 9, 2018 at 7:19
  • please confirm your env.php file permission is 664? May 9, 2018 at 8:28
  • I am assuming that after you have it working you have checked to see what has changed in the project? i.e. git status? May 14, 2018 at 13:06

1 Answer 1


The issue is coming because it may be env.php has been committed in git repository. So, when ever you will doing git pull the local env.php is replace by remote env.php which is not compatible for local environment. So first delete the env.php from remote brunch and then put env.php in .gitignore file. Thus it will be ignore by git pull and push. In this way local env.php not replaced by remote env.php.

  • 2
    Have you understood his question properly? May 9, 2018 at 4:54
  • Yes @Nikunj Vadariya , as per my understanding git setup was not done properly which causes the issue. That's why I have given a tested process where everything working fine. Then what wrong with that. May 9, 2018 at 5:11
  • He has issued only "project always asks to do the fresh installation". I am pretty sure if he follows your steps only then issue will not resolve. May 9, 2018 at 5:21
  • 2
    @PrasantaHatui, do you know magento 2 ask installation if you have not added below parameter in your enav.php file? 'install' => array ( 'date' => 'Fri, 17 Nov 2017 06:19:19 +0000', ),
    – kunj
    May 9, 2018 at 5:55
  • 1
    @PrasantaHatui, bro he used word fresh installation, so how env.php is there in his git ?? and also he mentioned that he has modified env.php as per his need , so how this issue related to gitignor ?? May 9, 2018 at 8:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.