Running php bin/magento setup:upgrade returns this error

'The website with id 0 that was requested wasn't found. Verify the website and try again.'

Running php bin/magento setup:db-data:upgrade will return the same error. Sometimes this will go through but setup:upgrade still returns the same error and other times a new error appears

{"0":"Invalid entity_type specified: customer","1":"#1 Magento\\Eav\\Model\\Entity\\AbstractEntity->setType('customer')

Running php bin/magento store:list will reveal that the Admin Store Table is indeed not being seen by Magento 2.

enter image description here

But It IS in all three SQL Tables 'store', 'store_group' and 'store_website'

enter image description here

This Website has been running for years and I have never encountered this issue before.

A Cloned Site was Created and I manually transferred database tables into the clone database.

This Site is up and running with all the data and the same modules as the main.

The Only Difference between the clone and the original is the database at this point.

As I Said and Show in the screen Shot this issue is not SQL database issue as that is all correct in the SQL Database/s store, store_group, store_website table/s

Does anyone have any insight into what else would cause the Store:List Table to Not Load Properly?

Thank you

enter image description here

Full Error

{"0":"The store that was requested wasn't found. Verify the store and try again.","1":"#1 Magento\Store\Model\StoreManager->getStore('admin') called at [generated/code/Magento/Store/Model/StoreManagerInterface/Proxy.php:119]\n#2 Magento\Store\Model\StoreManagerInterface\Proxy->getStore('admin') called at [vendor/magento/module-store/Model/Resolver/Store.php:30]\n#3 Magento\Store\Model\Resolver\Store->getScope('admin') called at [vendor/magento/framework/Translate/Inline.php:116]\n#4 Magento\Framework\Translate\Inline->isAllowed() called at [vendor/magento/framework/Translate/Inline.php:143]\n#5 Magento\Framework\Translate\Inline->processResponseBody('<!doctype html>\n...') called at [vendor/magento/framework/View/Result/Page.php:261]\n#6 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000002e55a199000000004f7be2df#) called at [vendor/magento/framework/View/Result/Layout.php:171]\n#7 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000002e55a199000000004f7be2df#) called at [generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php:193]\n#8 Magento\Backend\Model\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000002e55a199000000004f7be2df#) called at [vendor/magento/framework/App/Http.php:120]\n#9 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]\n#10 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]\n#11 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000002e55a192000000004f7be2df#) called at [index.php:39]\n","url":"/aydkykbdhe4s8hrp/admin/index/index/key/e3e794c43abe812fbfce454116d23f822e41224e9a7e8ce6d34e7c9dc2face11/","script_name":"/index.php","report_id":"1fb9c32d457fb71fbe197a28b65832ce89afc8e9a76277381a266c3699020315"}

1 Answer 1


Please try this solution. Take database backup before the the Query.

Run these SQL queries:

UPDATE `store` SET store_id = 0 WHERE code='admin';
UPDATE `store_group` SET group_id = 0 WHERE name='Default';
UPDATE `store_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';

Ref = https://community.magento.com/t5/Magento-2-x-Technical-Issues/The-website-with-id-0-that-was-requested-wasn-t-found/td-p/409253

  • Thank you for responding however the issue is not in the DB as the Screen shot shows the Data is Correct in the Table but when PHP fires to load it its only loading the Second Entry and Not First Admin website id 0 line is just skipped and not read at all I tried your sql update query but there is nothing to change to the data so nothing is fixed in that area. Commented Aug 18, 2023 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.