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' GO
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: