Skip to content

Instantly share code, notes, and snippets.

@yireo
Last active December 19, 2015 00:09
Show Gist options
  • Save yireo/5866699 to your computer and use it in GitHub Desktop.
Save yireo/5866699 to your computer and use it in GitHub Desktop.
Manually delete all entries from the core_url_rewrites folder (make sure to reindex afterwards)
<?php
require_once 'app/Mage.php';
Mage::app();
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$urlRewrites = Mage::getModel('core/url_rewrite')->getCollection();
foreach($urlRewrites as $urlRewrite) {
$urlRewrite->delete();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment