+44 (0) 752-340-6145

Database of your Prestashop project could be really huge after some time because of all the junk stats related data. The most of such data is not needed at all and it is only takes space on your server and slows the whole project down significantly. The best example is garbage data represent abandoned carts. Here are 2 simple SQL queries you can run on your database ( for example using phpmyadmin) to get rid of unwanted data.

Don’t forget to make a backup first!

Run these two queries on the database: (you can use phpmyadmin for it for example)

DELETE ps_cart_product FROM ps_cart_product JOIN ps_cart ON ps_cart.id_cart = ps_cart_product.id_cart WHERE ps_cart.id_customer = 0


DELETE FROM ps_cart WHERE ps_cart.id_customer = 0