Cannot delete a comment in WordPress
I have received a notification about a pending WordPress comment that was made for one article.
When I have clicked on links in my e-mail I wasn’t able to move it to trash, spam it or approve it.
I have received the following message:
You are not allowed to edit comments on this post.
After that I have tried to delete the comment from my WordPress administration panel but as you can see from the screenshot below I wasn’t able to select it as there is no checkbox for it. There are also no quick commands that are visible on the other comment in the screenshot.
Unfortunately there is no way to delete this comment from the WordPress itself. We’ll have to delete it directly from the database.
Before doing any changes please make a backup of your database!!!!
To do this please navigate to your Cpanel (http://yourwebsite/cpanel)
Open PHPMy Admin and in the left pane expand your WordPress database.
Select comments table (have in mind that before comments table there is a database prefix)
In the right pane sort comments by “comment_date”
As you can see, our problematic comment has a comment_post_ID of 0 which is not good.
Click on the Delete button for the desired comment and in the confirmation windows click OK.
That’s it.
I’m not sure why this is happening and if this a WordPress bug I hope it will be fixed soon.
Feel free to leave your comments below.