Showing results for 
Search instead for 
Did you mean: 

Error after launh Magento2

Error after launh Magento2

Hi instaled Magento 2 and when I´m trying to open a magento store and admin panel, I´m getting following errors:


To open a magento store i´m getting this error:




To open admin panel I´m getting this error:





Re: Error after launh Magento2

You need to run deployment command,

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush

For admin panel, you need to check admin URI from app/etc/env.php
check where frontName is your admin url,

 'backend' => 
array (
'frontName' => 'webadmin',

Your admin URL will be,

If Issue Solved, Click Kudos/Accept As solutions.

Re: Error after launh Magento2

Hi @manuel_barbosa


Can you please confirm that you have .htaccess file in the root directory of your magento 2 ?


Also can you remove generated directory then run below commands :


php bin/magento setup:di:compile

php bin/magento setup:static-content:deploy -f

php bin/magento cache:clean

php bin/magento cache:flush


Hope it helps !!

if issue solved,Click Kudos & Accept as Solution

Re: Error after launh Magento2

If you already fire this command

php bin/magento setup:static-content:deploy


and it doesn't help you , then fire with store code

php bin/magento setup:static-content:deploy  store_code  ex.en_US





If your site running on apache server and `Sign Static Files` is yes in store->configuartion->Advanced->Developer->Static File Setting


then may be you are missing htaccess file in `pub\static` directory


you can get sample .htaccess file at here



If my answer helps you then hit on kudos button and mark as accepted