Skip to main content

Posts

Showing posts from August, 2015

How to delete all products from magento using phpmyadmin/ sql

Sometimes you need to delete all products from magento store. You can do it from admin panel however if you have large number of products (more than 5000) delete will time out and you will have to delete like 200 products at a time. To save time you can go to phmyadmin and run following query to delete all products easily. Make sure you have backed up your database before this. This worked well on Magento 1.9 and did not cause any side effects.  SET FOREIGN_KEY_CHECKS = 0; TRUNCATE TABLE `catalog_product_bundle_option`; TRUNCATE TABLE `catalog_product_bundle_option_value`; TRUNCATE TABLE `catalog_product_bundle_selection`; TRUNCATE TABLE `catalog_product_entity_datetime`; TRUNCATE TABLE `catalog_product_entity_decimal`; TRUNCATE TABLE `catalog_product_entity_gallery`; TRUNCATE TABLE `catalog_product_entity_int`; TRUNCATE TABLE `catalog_product_entity_media_gallery`; TRUNCATE TABLE `catalog_product_entity_media_gallery_value`; TRUNCATE TABLE `catalog_product_entity_text`; TRUNCA