Good morning,

I'm using magento 2.1.9 and yesterday I did a backup recovery, but now when I try to access to;


the following error appears;

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'myserver.design_config_grid_flat' doesn't exist, query was: SELECT COUNT(*) FROM `design_config_grid_flat` AS `main_table`

How can I fix this error?

Thank you!

  • have you gone into the database to see if it's actually there? show tables;
    – treyBake
    Nov 17, 2017 at 9:47
  • I just checked my database and it's not there. So, how can i regenerate or create this table?
    – Núria
    Nov 17, 2017 at 9:55
  • try running php bin/magento setup:upgrade && php bin/magento setup:di:compile in terminal - might add it again, if that doesn't work I'll post the table structure and data for you to copy
    – treyBake
    Nov 17, 2017 at 9:59
  • It doesn't add it again. Could you post the table structure and data please? Thank you so much.
    – Núria
    Nov 17, 2017 at 10:05

2 Answers 2


As requested in comment:

CREATE TABLE `design_config_grid_flat` (
    `entity_id`        int(10) UNSIGNED PRIMARY KEY AUTO_INCREMENT,
    `store_website_id` int(11),
    `store_group_id`   int(11),
    `store_id`         int(11),
    `theme_theme_id`   varchar(255)

then the data:

INSERT INTO `design_config_grid_flat` (
    `store_website_id`, `store_group_id`, `store_id`
(null, null, null),
(1,    null, null),
(1,    1,    1);

This should do it - let me know if there are any issues (run in mysql^^)


Create the missing table:

  CREATE TABLE `design_config_grid_flat` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `store_website_id` int(11) DEFAULT NULL COMMENT 'Store_website_id',
  `store_group_id` int(11) DEFAULT NULL COMMENT 'Store_group_id',
  `store_id` int(11) DEFAULT NULL COMMENT 'Store_id',
  `theme_theme_id` varchar(255) DEFAULT NULL COMMENT 'Theme_theme_id',
  PRIMARY KEY (`entity_id`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='design_config_grid_flat';

Then run the indexer:

php bin/magento indexer:reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.