Magento – Vendor files not found, after trying to install extension

magento2

I tried to install an extension in my website. Now frontend and backend are giving "Error 500" and in ssh, command php bin/magento setup:upgrade gives me errors:

PHP Warning:  require(/home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/../../src/Migration/cli_commands.php): failed to open stream: No such file or directory in /home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/autoload_real.php on line 70
PHP Warning:  require(/home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/../../src/Migration/cli_commands.php): failed to open stream: No such file or directory in /home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/autoload_real.php on line 70
PHP Fatal error:  require(): Failed opening required '/home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/../../src/Migration/cli_commands.php' (include_path='/home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/magento/zendframework1/library:.:/usr/share/php') in /home/148511.cloudwaysapps.com/tnkvxgzzzd/public_html/vendor/composer/autoload_real.php on line 70

How can I fix this and get my website back to normal?

Best Answer

First of all check if the module you installed is actually in the vendor/ folder. If this is not the case and you installed it via composer you must run composer install after you dit that you wanna run this command rm -rf var/cache/* var/generation/* var/page_cache/* var/view_preprocessed/* var/di/* pub/static/* generated/* (just to be sure).

If that doesn't fix the problem make sure you run magento in developer mode.

Run this command bin/magento deploy:mode:show if you run in production mode run this command bin/magento deploy:mode:set developer

Hope this helps