I have SSH access to a Magento 2 store and attempting to unlock an admin user. I can't run bin/magento or php bin/magento in the folder of the magento instance. How can I get this command to work? I'm getting the following error:

Warning : Uncaught Exception: Warning: require(/home/{{siteName}}/public_html/setup/config/application.config.php): failed to open stream: No such file or directory in /home/{{siteName}}/public_html/vendor/magento/framework/Console/Cli.php on line 57 in /home/{{siteName}}/public_html/vendor/magento/framework/App/ErrorHandler.php:6

Stack trace:
#0 /home/{{siteName}}/public_html/vendor/magento/framework/Console/Cli.php(57): Magento\Framework\App\ErrorHandler->handler(2, 'require(/home/i...', '/home/{{siteName}}/...', 57, Array)
#1 /home/{siteName}}/public_html/vendor/magento/framework/Console/Cli.php(57): require()
#2 /home/{{siteName}}/public_html/bin/magento(22): Magento\Framework\Console\Cli->__construct('Magento CLI')
#3 {main}
  thrown in /home/{{siteName}}/public_html/vendor/magento/framework/App/ErrorHandler.php on line 61

Fatal error: Magento\Framework\Console\Cli::__construct(): Failed opening required '/home/{{siteName}}/public_html/setup/config/application.config.php' (include_path='/home/{{siteName}}/public_html/var/generation:/home/{{siteName}}/public_html/lib/internal:/home/{{siteName}}/public_html/vendor/magento/zendframework1/library:/home/{{siteName}}/public_html/vendor/phpunit/php-file-iterator:/home/{{siteName}}/public_html/vendor/phpunit/phpunit:/home/{{siteName}}/public_html/vendor/symfony/yaml:.:/usr/local/php73/pear') in /home/{{siteName}}/public_html/vendor/magento/framework/Console/Cli.php on line 57```

PHP 7.3.16

  • run composer update command after try – Mohit Patel Jun 27 '20 at 3:43
  • That requires magento authentication keys, which I cant get because we can't log in. Is there a way to get these keys from the command line? – pjib12 Jun 27 '20 at 16:02
  • first open this link marketplace.magento.com and create the new account and after go to your profile section and create the new access key – Mohit Patel Jun 27 '20 at 18:32

Your Answer

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

Browse other questions tagged or ask your own question.