How to perform a mass delete on blog comments in nopCommerce

We all know that managing an online store is not an easy task. Especially when your store site includes CMS (content management system) features like blog, forums and news etc; maintaining the site is a big undertaking.

If your store site is getting a lot of online traffic there is always a possibility that you will have to deal with “spam”. For example: There will be times when you will see spam comments in your blog post. What can you do about it? Well, you can certainly go to administration section and delete those comments. But, what if you are getting thousands of spam comments? Is it really feasible to go to administration section and delete those spam comments one by one?

As of now, nopCommerce does not offer any option to perform a mass delete on blog comment. Today, we will discuss, how to delete blog comments “in mass” directly from the database.

Requirement: You will need access to your SQL database for the store site in order to perform this mass delete task.

Connect to your server and open your SQL database.


Use this SQL query to delete “ALL” comments “between” two dates:

DELETE FROM [BlogComment]
WHERE [CreatedOnUtc] between '2015/07/21' and '2016/07/23'


Note: Replace “date values” with your dates

Run this query against your database and all the comments between the “two” dates will be deleted instantly like this:



 Looking for quality nopCommerce Web Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , | Posted under nopCommerce | RSS 2.0

Author Spotlight

Lavish Kumar

Founder, developer and owner of - By profession, he is a software programmer / web developer, web designer & DBA. He is passionate about technology and electronic gadgets. He enjoys writing tech articles and developing web applications. He is a nopCommerce MVP and author of official nopCommerce Designer's Guide.

Leave a Reply

Your email address will not be published. Required fields are marked *