0

I am trying to migrate an established Magento2 store from an EC2 server to work on my local developer environment. I have the files downloaded in my root directory and and have backed-up the database and put the database into my new mysql database. However, when I go to my localhost I get this...

Fatal error: Uncaught Magento\Framework\Exception\NoSuchEntityException: The store that was requested wasn't found. Verify the store and try again. in /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreRepository.php:112 Stack trace: #0 /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreRepository.php(127): Magento\Store\Model\StoreRepository->getById('1') #1 /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreResolver.php(181): Magento\Store\Model\StoreRepository->getActiveStoreById('1') #2 /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreResolver.php(126): Magento\Store\Model\StoreResolver->getDefaultStoreById('1') #3 /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreManager.php(160): Magento\Store\Model\StoreResolver->getCurrentStoreId() #4 /Users/jonathanhelvey/UpperLimitsSite/httpdocs/generated/code/Magento/Store/Model/StoreManagerInterface/Pr in /Users/jonathanhelvey/UpperLimitsSite/httpdocs/vendor/magento/module-store/Model/StoreRepository.php on line 112

Does anyone know the right steps to migrate a Magento2 store to localhost from development. There is no version control. The store also does have 3rd parties extensions.

1
0

Try this solution.You run query in your database step by step.

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;

THANKS.

2
  • perhaps you can explain what this ‘copy and paste’ answer is doing, to help us understand what the problem is and how it is resolving it? – paj Aug 4 '20 at 18:44
  • so any reason default store id has been changed so above answer is set the default. – Mohit Patel Aug 5 '20 at 4:43
0

Here is the answer.

Blockquote

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.