Subscribe to
Posts
Comments

Couple of weeks back noted there were no comments for moderation on my blog, I was concerned a bit because not even 1 spam comment was there. I think I was the first person to worry for not having a spam comment :-) - but seriously I just left it for a while until I tried to provide a comment. First I thought it is a version problem and then upgraded my wordpress blog from 2.5.1 to 2.6.1 and that did not solve the problem. Tried to remove extra trails in the wp-config and checked comment page and nothing seem to help out.

I was trying to modify all files because my other domains which has 2.5.1 was receiving comments without problems. Finally what helped me fix this issue was with the table wp_comments. Below are the steps that I followed to fix this bug temporarily and will get to know in some days whether is it going to repeat or not?!

1. I am using SQL Browser, so you can use your hosting sql tool or any third party to open database.
2. Right click on wp_comments and click edit.
3. In the advance option you will find the “Auto Increment” value.
4. For me it was around 42,xxx (I think it is 42620 not sure), the real comments was like in hundreds. The reason is that for every spam comment an index will be used - so with thousands of spam the index went to some 40 thousands.
5. The datatype for the field comment_id is bigint(20) - then it shouldn’t give problem. But I am not
sure.
6. So I checked the last (max) comment id for the table wp_comments which was like 30 thousand something (now I can redesign the table removing constraints and stuff and keep it simple - but I haven’t done that yet).
7. Reset the Auto increment value to be the number (max comment id = latest comment id) + 1
8. Now the comments are inserted into the table with no issues/problems.

I do not remember changing anything with database after upgrade (2.6.1) or earlier and if it is a wordpress bug - I hope we can expect another version pretty soon at wordpress.org.

Let me know if this helps.
Regards,
Shiva

Leave a Reply