SHARE

You may want to delete certain comments on WordPress. You should delete spam comments, you may want to get rid of very old comments and you may even want to delete all comments on WordPress when you are starting afresh. Deleting or moderating comments is a tedious task. But deleting all comments is not that hard.

Before you choose a method to delete all comments on WordPress, make sure you have a backup of your data. You can go to WordPress Backups and check the options. Do not try to delete anything from your site before you have backups. Now, there are a few solutions to how to delete all comments on WordPress.

Manual Deletion

You can delete the comments displayed on every single page. You can select all comments displayed on a page or screen and delete all of them at once. But this will restrict you to the number of comments that are on the page you are viewing. Usually, there would be twenty comments listed on a page. Thus, you would have to delete twenty at a time. This can be tedious. You must go to the Screen Options and must increase the number of comments to be viewed or displayed on one page. Most WordPress themes will allow the display of many more comments than just twenty. Opt for fifty or hundred if such settings are available. That way you would be able to delete many more in single attempts and you can thus save time and effort.

Should you have thousands of comments, this manual deletion process is almost impractical. You don’t want to repeat the selecting all comments on one page and deleting it for a hundred times. You would need a much quicker and one click solution.

Plug-ins

That is where plug-ins comes in. WordPress wouldn’t be even half as appealing and convenient had it not been for plug-ins. Not everyone is accustomed with codes, php and SQL. Plug-ins don’t need you to write a single code. You simply have to choose an appropriate plug-in and it will access all the comments you have on your blog. You can delete all comments with a single click.

Choose a plug-in that works with your WordPress version and the theme you are using. Not all plug-ins would be suitable in every case. Also, bear in mind that plug-ins can allow you to delete certain types of comments. For instance, you may want to delete only those comments that are spam or are waiting to get approved. You may want to delete certain old comments or those that are not relevant any more. You may also want the moderated or approved comments. Any random plug-in would not have all these features. Thus, you have to compare plug-ins and see what kind of features you would get. Some may allow you to delete comments by dates or till a certain date. Some will allow you greater flexibility or a more definitive approach.

Insert A Code

A very simple way to delete all comments from WordPress is to run an SQL code. You can go to phpMyAdmin and insert “DELETE FROM wp_comments WHERE comment_approved = 0”. This will delete all comments. If you have a different table name for your comments then use that. If you have a generic table name or an unaltered one then this code should work.

You can also use “delete from wp_comments where comment_approved = ’spam’;” if you wish to delete spam comments and any such classification which may segregate the type of comments you wish to delete. Don’t use the quotes as they are just to highlight the code.

Have A Backup, Always!

One cannot stress more how important a backup is when you make any sweeping changes to your WordPress site. Even if you are initiating a relatively minor change or installing a simple plug-in, you must backup your site. You never know when you would lose some crucial data or your site may go kaput as well. You may delete all comments and then you may realize that some important comments need to be accessed. If you have a backup then you can extract whatever you want.

Before you delete all comments from your WordPress site, assess the value of the comments or the lack of it. Thousands of comments on a site are an asset. It is a record of how active the blog was or how popular it was. Unless you find those comments irrelevant to your present goals, you should consider having them on the site. You can archive them but allow the search engines to get access to user generated content. That works well for sites looking for a better rank and obviously more traffic. Getting rid of all comments may not be wise in every case.

SHARE
Brandon Gaille is one of the nation's top experts on blogging. He built the monthly traffic to his marketing blog, BrandonGaille.com, to over a million visitors in 15 months. He also runs an online course & podcast called "The Blog Millionaire."