I mistakenly deleted composer.json and composer.lock from my Magento ecommerce site and now my site will not respond. How can i solve that please?

I tried reinstalling but still the site will not respond.



If you just deleted the two files and they are present in your Git, then git status will tell you what to do:

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    deleted:    composer.json
    deleted:    composer.lock

Then run:

git checkout -- composer.json
git checkout -- composer.lock

and check again. Git status will not show the files as deleted any more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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