Magento Error: Item (Mage_Core_Model_Store) with the same id “0” already exist

Problem:

I transferred my Magento site files from one computer to another (it can be from local computer to online or from development site to production site). I imported the database. Now, when I try to browse the new location’s site, I get the following error:

There has been an error processing your request
Item (Mage_Core_Model_Store) with the same id “0” already exist

Solution:

There can be multiple rows inserted with the same value in tables core_store, core_website and core_store_group.

SELECT * FROM core_store WHERE code='admin';
SELECT * FROM core_store_group WHERE name='Default';
SELECT * FROM core_website WHERE code='admin';

You have to delete such duplicate rows from core_store, core_website and core_store_group table. That is, if you have three rows with same value then remove the two duplicate rows.

After that, Refresh Cache from System -> Cache Management.

That’s all. This should solve the error.

Hope this helps. Thanks.