[magentoframeworkexceptionnosuchentityexception] no such entity.

I had the same issue. It appeared to be caused by some entity ids that needed to be set to 0.

When you transfer the data the insert records on these specific records are automatically generated and tend to start at 1 and not 0.

This script worked for me:

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;

Hope it helps.

https://magento.stackexchange.com/questions/102739/magento-2-moving-site-no-such-entity

Scroll to Top