:e ~/article/delete-all-customers-and-products-in-magento.md [readonly]

smjrifle@smjrifle.xyz:~/article/ $

Delete All Customers and Products in Magento

It can be a pain-staking task to delete all products and customers in Magento when there are thousands of them. We can use SQL to delete all customers and products in Magento directly.

To delete all customers:

SET FOREIGN_KEY_CHECKS=0;
TRUNCATE customer_address_entity;
TRUNCATE customer_address_entity_datetime;
TRUNCATE customer_address_entity_decimal;
TRUNCATE customer_address_entity_int;
TRUNCATE customer_address_entity_text;
TRUNCATE customer_address_entity_varchar;
TRUNCATE customer_entity;
TRUNCATE customer_entity_datetime;
TRUNCATE customer_entity_decimal;
TRUNCATE customer_entity_int;
TRUNCATE customer_entity_text;
TRUNCATE customer_entity_varchar;
SET FOREIGN_KEY_CHECKS=1;

Warning: Always backup your database before running these commands.

[:bp] The Git Auto Pull Push Script [:bn] Weekly DIY and Workshops
-- NORMAL -- delete-all-customers-and-products-in-magento.md PHP UTF-8 0% smjrifle@xyz