Created
March 27, 2019 09:31
-
-
Save yogeshdubey2006/a70d657ec95eaabc294b57044f47027b to your computer and use it in GitHub Desktop.
Magento - Truncate URL Rewrites
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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`; | |
TRUNCATE TABLE `enterprise_url_rewrite_redirect`; | |
SET FOREIGN_KEY_CHECKS = 1; | |
#Run a reindex afterwards. Note this includes enterprise_url_rewrite_redirect - removing all custom redirects |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment