Skip to content

Instantly share code, notes, and snippets.

@electricjesus
Created November 1, 2013 15:42
Show Gist options
  • Save electricjesus/7267306 to your computer and use it in GitHub Desktop.
Save electricjesus/7267306 to your computer and use it in GitHub Desktop.
mage cleanup - The two queries you need when you need to clean out categories and products. I haven't tested this with active orders, yet. I usually use this before re-importing via Magmi. I use this for my own DEVELOPMENT purposes. SHORT RAW: http://git.io/4KbqhA
## PLEASE use this for DEVELOPMENT only. Don't blame me if you're a dumbass.
DELETE FROM `catalog_product_entity`;
DELETE FROM `catalog_category_entity` WHERE `entity_id` NOT IN (1,2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment