Skip to content

Instantly share code, notes, and snippets.

@eriksimonic
Created June 21, 2015 20:49
Show Gist options
  • Save eriksimonic/41f3feb9afb18e4c6973 to your computer and use it in GitHub Desktop.
Save eriksimonic/41f3feb9afb18e4c6973 to your computer and use it in GitHub Desktop.
Delete all products from magent.
<?php
/**
* Created by PhpStorm.
* User: Admin
* Date: 20. 06. 2015
* Time: 11:48
*/
ini_set('display_errors', 1);
umask(0);
require_once( getcwd(). '/app/Mage.php');
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$write_api = Mage::getSingleton('core/resource')->getConnection('core_write');
$write_api->query('DELETE FROM `catalog_product_entity`');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment