Skip to content

Instantly share code, notes, and snippets.

@artmouse
Created November 25, 2014 22:04
Show Gist options
  • Save artmouse/05ac0289cffbc28afbfa to your computer and use it in GitHub Desktop.
Save artmouse/05ac0289cffbc28afbfa to your computer and use it in GitHub Desktop.
Clear All URL Rewrites - Magento Enterprise
Anyway to successfully truncate and rebuilt all rewrite tables you can execute:
SET FOREIGN_KEY_CHECKS = 0;
TRUNCATE TABLE `core_url_rewrite`;
TRUNCATE TABLE `enterprise_catalog_category_rewrite`;
TRUNCATE TABLE `enterprise_catalog_product_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite`;
TRUNCATE TABLE `enterprise_url_rewrite_category_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_product_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_cl`;
TRUNCATE TABLE `enterprise_url_rewrite_redirect_rewrite`;
SET FOREIGN_KEY_CHECKS = 1;
and then run:
sudo php indexer.php --reindex catalog_url_product
sudo php indexer.php --reindex catalog_url_catalog
sudo php indexer.php --reindex url_redirect
@udovicic
Copy link

sudo? :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment