Magento showing wrong product count in category in admin

After importing or updrading database, you may face this problem.

To fix this, you need to run following sql query:

Kindly, take database backup before running query to prevent accident deletes.

1
DELETE FROM catalog_category_product where product_id NOT IN (SELECT entity_id FROM (catalog_product_entity))

 

坚持原创技术分享,您的支持将鼓励我继续创作!