0

I accidentally deleted the vendor folder in my Magento 2 installation and I'm getting an autoload error and I also noticed that the env file is missing, is there any way to solve the problem ? I also read that I can do composer install but will that affect my data ?

Thanks.

1

composer install will recreate the vendor folder only. To recreate the .env file (app/etc/env.php) you'll need to reinstall Magento.

2
1

vendor folder is just a deployment folder that comes from the commmand composer install.

I assume composer is installed on your machine, open a terminal and from the root of your Magento site, run composer install. Then your site should be back up as normal.

4
  • I ran the command as you said but instead I'm now getting a 500 error, any ideas ? Thank you so much by the way.
    – Varulv
    Jul 17 '20 at 18:04
  • 500 is a server error: you should see in either magento log or your webserver log, what the error details is Jul 17 '20 at 18:08
  • Just a permission error :) fixed. Thank you again
    – Varulv
    Jul 17 '20 at 18:22
  • @HerveTribouilloy composer install not resolving my issue, any help thanks magento.stackexchange.com/q/319343/57334
    – zus
    Aug 15 '20 at 15:43

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.