I have an issue with my development store (Magento 2.2.7), I have cleaned all data from the database with this tutorial (https://www.titechglobal.com/magento-2-x-how-to-clear-test-data-before-production/).

Now, in the backend, my products / categories appears correctly but from the frontend, my products are not showing in the category pages but I can access to the product page with the direct link and also nothing appears when I type my product name in the search bar.

I run this command on my server :

rm -rf var/di var/generation

  • php bin/magento cache:clean
  • php bin/magento cache:flush
  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento indexer:reindex

  • php bin/magento setup:static-content:deploy -f

But nothing solved my issue. I found something strange, my table catalog_category_product_index is empty but I don't know why.

Can you help me??

  • your products are not in the category, assign products to the category then they will show.
    – ASQ
    Jul 24, 2019 at 7:12
  • The products are assigned in the category. From the back end, when I go to the category, in the "Products in category" tab, I see all products..
    – VP13
    Jul 24, 2019 at 7:26
  • Did you check your logs ?
    – Kozame
    Jul 24, 2019 at 8:09
  • No, where I can check my logs?
    – VP13
    Jul 24, 2019 at 8:12
  • In var/log/ you have system.log and exception.log. You also have may be some reports in var/report.
    – Kozame
    Jul 24, 2019 at 8:15

1 Answer 1

  • You can run the following commands:

php bin/magento setup:upgrade

php bin/magento indexer:reindex

php bin/magento cache:flush

  • Check list:

1: The products must be Visible in Catalog.

2: The products must be Enabled.

3: Product must have a stock Quantity.

4: The product must be set to In Stock.

5: If the product is set not to track stock, it still has to have a stock Quantity and be set to In Stock.

6: The product must be assigned to the target Category.

7: If using multi-website mode (or if you imported the products through Data Flow), the products must be assigned to the target Website. (check table catalog_product_website)

8: You must refresh your Cache / Indices, just to make sure.(php bin/magento cache:flush )

Your Answer

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

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