The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store
table inside of it. Also, it might be that there is a table prefix that might or might not be at play here.
Try these first:
- Check your database to ensure there is a
core_store
(or variant) table available.
- Check to make sure your
local.xml
config file is pointing to the right database.
- Ask your host to restore from another restore point.
- Check to ensure your
local.xml
didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
First of all - create backup of all database that you have right now.
Looks like you haven't basic table. Without this table Magento can't work at all.
If you have other tables, only this one missing - you can try to install Magento to OTHER database and copy this table with mysqldump & mysql .
If websites data is not important for you (as example if it's new website, or test website) - you can just re-install Magento.
Anyway, best of all - to perform any actions only by Magento developer.
Best Answer
This is likely because the installation script that installed this table hardcoded the script. Something like
install-x.x.x.php
instead of$this->getTable('.../...')
.So, check all of your extensions'
sql
directory scripts and confirm that the table names are hardcoded. If that's the case, you'll have to just update your table names with your prefix included.