Resolution
If you have only have one website, then the second test for the websites doesn’t apply, and you only need to test for stores.
To solve this issue, identify the invalid rows left from those configurations.
-
SSH to the server and run this command:
bin/magento
-
The error message may indicate what rows and tables remain in the database from deleted sites. For example, the following is an error indicating that the requested store wasn’t found:
... In StoreRepository.php line 112: The store that was requested wasn't found. Verify the store and try again.
-
Run this MySQL query to verify that the store cannot be found, which is indicated by the error message in step 2.
select distinct scope_id from core_config_data where scope='stores' and scope_id not in (select store_id from store);
-
Run the following MySQL statement to delete the invalid rows:
delete from core_config_data where scope='stores' and scope_id not in (select store_id from store);
-
Run this command again:
bin/magento
If you get an error like the one below which indicates that the website with id X that was requested wasn’t found, you have configurations remaining in the database from website(s), as well as store(s), that have been deleted.
In WebsiteRepository.php line 110: The website with id X that was requested wasn't found. Verify the website and try again.
Run this MySQL query and verify that the website can’t be found:
select distinct scope_id from core_config_data where scope='websites' and scope_id not in (select website_id from store_website);
-
Run this MySQL statement to delete the invalid rows from the website configuration:
delete from core_config_data where scope='websites' and scope_id not in (select website_id from store_website);
Related reading
- Adobe Commerce deployment troubleshooter
- Checking deployment log if cloud UI has “log snipped” error
- Best practices for modifying database tables in the Commerce Implementation Playbook
Adobe Commerce at Summit
Register for these sessions:
- Elevate and Empower Teams with Agentic AI for Exceptional Experiences (attend online)
- Supercharge Your Social Commerce with Adobe + Meta (attend online)
- Put the Customer at the Center and Build Relationships That Last a Lifetime (attend online)
- B2B Reimagined: Transforming Go-to-Market Strategies for Profitable Growth (attend online)
- How AI Is Transforming the Commerce Landscape (attend online)
Connect with Experience League at Summit!
Get front-row access to top sessions, hands-on activities, and networking—wherever you are!
Learn more