I have a WordPress site on the web. Some spammers post many garbage comments on my WordPress. Can I drop the wp_comments table in my WordPress database? I don’t want anyone to post comments. Will the WordPress site crash when I drop the wp_comments table?If i drop the wp_comments table, when someone write comment on my article, and click to post it ,will the wordpress be crashed at this situation?
drop table wp_comments
works fine for me.
Leave a Reply
You must be logged in to post a comment.
This is a chunk of code that I’ve used in the past. It will redirect users away from your comments section, and hide that comments section on your backend. Pick and choose which pieces you want, and place them in your theme’s functions.php file.
I would imagine that this will cause many problems/errors. You will be better off disabling comments from the specific code that inserts comments.
You can just comment out anywhere you find
wp_insert_comment($data);
This will allow you to maintain the existing code just in case you want it back someday.I would suggest you to use
Akismet
to automate the filtering of comments into those that are likely to be genuine and the 99% that sadly are no more than spam links to dodgy sites instead of dropping the comment table from the wordpress..Dropping of table can sometime cause many issues ..But using a plugin like
Akismet
woulld be the best solution for preventing spam comments