cancel
Showing results for 
Search instead for 
Did you mean: 

how can i delete 8000 product in admin panel

SOLVED

how can i delete 8000 product in admin panel

Hi

Magento 2.3.0

I have 39500 products on my website

I want to delete 8950 products, but it is very slowly 

please help me to fast do it 

 

thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: how can i delete 8000 product in admin panel

Hello @houman_ahghari ,

You can use database to quickly remove these product. Use the following query:

DELETE FROM catalog_product_entity WHERE sku in (sku1, sku2, sku3, sku4, ...);

After executing the above query please execute the following command (via terminal) from your magento root folder:

php bin/magento indexer:reindex

Note: Please take the backup of DB before executing first command.

If this helps you please accept it as solution and give kudos.

Regards.

View solution in original post

Re: how can i delete 8000 product in admin panel

@houman_ahghari If there is a particular login of which product needs to be deleted then you can create a file on root with logic of deleting products according to particular condition.

Or you can use the below sql query.

 

DELETE FROM catalog_product_entity WHERE entity_id in (select entity_id from catalog_product_entity where condition);

Get all the ids which you want to delete using select statement and then delete all using this query.

 

Make sure to take database backup.

 

Thanks

View solution in original post

2 REPLIES 2

Re: how can i delete 8000 product in admin panel

Hello @houman_ahghari ,

You can use database to quickly remove these product. Use the following query:

DELETE FROM catalog_product_entity WHERE sku in (sku1, sku2, sku3, sku4, ...);

After executing the above query please execute the following command (via terminal) from your magento root folder:

php bin/magento indexer:reindex

Note: Please take the backup of DB before executing first command.

If this helps you please accept it as solution and give kudos.

Regards.

Re: how can i delete 8000 product in admin panel

@houman_ahghari If there is a particular login of which product needs to be deleted then you can create a file on root with logic of deleting products according to particular condition.

Or you can use the below sql query.

 

DELETE FROM catalog_product_entity WHERE entity_id in (select entity_id from catalog_product_entity where condition);

Get all the ids which you want to delete using select statement and then delete all using this query.

 

Make sure to take database backup.

 

Thanks