I need to delete/truncate the Magento 1.9 core URL rewrites which are older than 3 months of core_url_rewrite table in database.
What’s the exact SQL query to achieve this?
I need to delete/truncate the Magento 1.9 core URL rewrites which are older than 3 months of core_url_rewrite table in database.
What’s the exact SQL query to achieve this?
2
Answers
You can truncate whole table, Magento will automatically create required ones, just do a reindexing of catalog url rewrites.
You can’t. There is no information about the date in the
core_url_rewrite
table. You should also watch out for custom redirects, that won’t be recreated automatically. The SQL request to clear out the table, without deleting custom redirects is :Once you run a reindex, all the categories and products URLs will be generated again.