when I install a new theme I do this commands via Putty:

php bin/magento setup:upgrade 

how can I fix this problem? I'm working on Magento 2.1.0

PHP Warning: Uncaught Exception: Warning: require(/var/www/vhosts/a.com/httpdocs/setup/config/application.config.php): failed to open stream: No such file or directory in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/Console/Cli.php on line 57 in /var/www/vhosts/a.com/httpdocs/vendor/magento/framework/App/ErrorHandler.php:61

  • Please check,it may cause of permission. – Pramod Kharade Nov 16 '17 at 2:40

Your site miss the file /var/www/vhosts/a.com/httpdocs/setup/config/application.config.php, you could copy it from original official install files.

Also a possibility, the file application.config.php or the directory /var/www/vhosts/a.com/httpdocs/setup/config/ lack permission, try to give it read and write permission.

  • setup folder not in httpdocs – Amd2030 Nov 16 '17 at 17:54
  • 1
    @Amd2030 Setup folder not in httpdocs indicates that your installation is not complete, please download again from official page magento.com/tech-resources/download – Key Shang Nov 17 '17 at 1:28
  • had this happen when cloning a site - setup didn't copy for some reason. Upload the setup folder into the base - php bin/magento setup:upgrade > php bin/magento setup:di:compile > php bin/magento setup:static-content:deploy -s standard = problem fixed for me. Thanks. – dawhoo Sep 24 '18 at 16:19

first: setup folder not there so, i install a new and clear installation 
second: my hosting use Plesk so all command should be with the path of php
the replacment code of

php bin/magento setup:upgrade 


/opt/plesk/php/5.6/bin/php bin/magento setup:upgrade 


Deleting manually

  • var/generation
  • var/cache
  • var/view_preprocessed
  • var/page_cache
  • var/di

solved it for me.

or by using ssh you can run below commands

rm -rf var/cache/* var/generation/* var/view_preprocessed/* var/page_cache/* var/di/*

Hope this will help.

  • after run previous commands: # var/generation/* -bash: var/generation/Composer: Is a directory # var/view_preprocessed/* -bash: var/view_preprocessed/css: Is a directory # var/page_cache/* -bash: var/page_cache/mage--0: Is a directory # var/di/* -bash: var/di/adminhtml.ser: Permission denied – Amd2030 Nov 16 '17 at 18:09
  • Hi, I have updated a script. – Meetanshi Nov 17 '17 at 3:45
  • still not working – Amd2030 Nov 17 '17 at 21:16
  • this doesn't work – dchayka Jul 18 '18 at 21:44

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.