If I call php bin/magento setup:upgrade
I get:
“The store that was requested wasn't found. Verify the store and try again.”
What can I do?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityIt's likely that one of your setup scripts is failing. Check system.log
,debug.log
or exception.log
in var/log
directory to see if you can get a stack trace to find the problematic script.
Please check the below possible solution for this. Before executing the below queries, Please checks the respected values in the database table.
SET FOREIGN_KEY_CHECKS=0;
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';
SET FOREIGN_KEY_CHECKS=1;
We had the same issue but it related to a multi-store setup. With Litespeed active, it default to a store of ID 1. We had to manually set this to avoid it applying the default store ID and causing an error in indexing, upgrading etc.
Setting is under Configuration > Advanced > Litemage Cache
Thanks to Silas Palmer on this post for debugging tips: Magento 2: Requested store is not found