wordpress Blank page after posting a comment (wp-comment-post.php)
- If you try to back up your database, you’ll be thrown with this error message – wp_comments is marked as crashed and should be repaired when using LOCK TABLES
- Recent comments widget appears blank.
- Top commenter widget appears blank.
- Comment posted will not be written into DB, therefore will not be shown.
- Comments section in WP Admin appears to have zero records.
After searching the Internet high and low in hoping to find similar cases to help me identify and fix the problem, I end up with nothing. I found this solution finally on hongkiat website. Thanx a ton to him. Below is the cause and solution to the problem. Plz Leave Comment If you Like the post…
The fix / Solution
A list of your databases will appear. Click the one that is your WordPress database.
2. Click ‘databases’

3. Tick the check box against the table wp_comments
4. Scroll all the way down and look for ‘With selected‘ drop-down box. Select Repair table and things should be alright.

Now you have repaired your table and your comment should work fine now.
Plz do Leave Comment If your problem is solved… If not follow instructions below…
In case your storage engine does not support repair table then go through following steps:
Before going further ahead, Please take a backup of your database. Beacause you may loose all the comments posted till now on your blog.
After following first two steps from above procedure,
3. Click on SQL on top of Table List
4. You will get the window similar to this6
5. On the text window type following query and click on ‘go’ button.
DROP TABLE IF EXISTS `wp_comments`; CREATE TABLE `wp_comments` ( `comment_ID` bigint(20) unsigned NOT NULL auto_increment, `comment_post_ID` int(11) NOT NULL default '0', `comment_author` tinytext NOT NULL, `comment_author_email` varchar(100) NOT NULL default '', `comment_author_url` varchar(200) NOT NULL default '', `comment_author_IP` varchar(100) NOT NULL default '', `comment_date` datetime NOT NULL default '0000-00-00 00:00:00', `comment_date_gmt` datetime NOT NULL default '0000-00-00 00:00:00', `comment_content` text NOT NULL, `comment_karma` int(11) NOT NULL default '0', `comment_approved` varchar(20) NOT NULL default '1', `comment_agent` varchar(255) NOT NULL default '', `comment_type` varchar(20) NOT NULL default '', `comment_parent` bigint(20) NOT NULL default '0', `user_id` bigint(20) NOT NULL default '0', PRIMARY KEY (`comment_ID`), KEY `comment_approved` (`comment_approved`), KEY `comment_post_ID` (`comment_post_ID`), KEY `comment_approved_date_gmt` (`comment_approved`,`comment_date_gmt`), KEY `comment_date_gmt` (`comment_date_gmt`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
6. You will receive message that the query was successful.
Your comments should be working fine now.
If this does not work for you, try this: (thanks to Matthew Ogston for this)
When publishing a new comment, users receives a 404. Problem is that comments DB table for some reason stops auto-incrementing itself.
Just change the ‘comment_ID’ id column to Auto Increment and it should work okay. New comments will be saving correctly after this.
If nothing works for you, then backup everything and then do a fresh install for your wordpress. This should solve all your problems.
Plz Leave Comment If you Like the post…
Related Posts :
I wanted to choose a different header for my home page and for my internal post pages in WordPr ...
In our previous post we have written about the FIFA World Cup 2010 Schedule wall paper and Sche ...
The easiest way to get apps. If you are upgrading to Windows 7 from XP you will need to do a cle ...
If You Are Planning to redesign your site or move your site and take backup or create a New them ...
How can you backup and restore your WordPress blog database? If you’ve been blogging long enough ...
How to make avatar and how it appears when you comment on my website or any other ...
We are often advised to password protect our files which contain sensitive information.But th ...
Many user prefers to view music videos on YouTube how aboutviewing song lyrics along with YouT ...
o download music album cover art from internet. Here is yet another similar open source applic ...
Here is a detailed step by step turorial guide on how to transfer the local Wordpress blog in yo ...
39 Comments to “wordpress Blank page after posting a comment (wp-comment-post.php)”
Post comment
daily email newsletter
Video of The Day
Random Articles
- Free Unlimited Idea Gprs Hack Trick for mobile phones .100 % Working 2010
- blacksn0w the ultimate iPhone unlocker.
- How To Hack Any Moblie Via Bluetooth 100 % Working
- How to Set a Custom SMS Alert Tone for Incoming iPhone Text Messages.
- Google New Image Search 4 Android, Use Pictures 2 Search, Instead of Text-Google Googles
- How To Backup and Restore Your Website Database Automatically Regularly ?
- Youtube Ringtone Maker For Mobile ,Free Download
- why windows live writer 2009 is the best publishing tool for blogs and website ,check this out below .
- Amazing FIFA World Cup Schedule Wheel With Result Tracking
- How To Password Protect ,Decrypt or Encrypt Access 2010 Database ?
Popular Posts This Month
- Free Unlimited Idea Gprs Hack Trick for mobile phones .100 % Working 2010
- Free unlimited 3G Bsnl Hacking trick for mobile ,100% 2010 working
- Most Beautiful Free Samsung Corby Wallpaper ,3 Section Download 2010 Part 1
- FIFA World Cup 2010 Schedule Wallpaper and Excel Sheet
- Add music & song to about me and orkut profile
Recent Posts
- New Rupee Symbol Launched Download Free
- Antivirus Web Browser For India with 1500+ Themes Built on Mozilla Firefox-Epic
- Chart Comparing iPhone 3GS and iPhone 4 ,2010
- Latest WordPress 3.0 Released- Available for Download
- Most Beautiful Free Samsung Corby Wallpaper ,3 Section Download 2010 Part 2
- FIFA 2010 World Cup Schedule in Indian Time (IST)-Excel Format
- FIFA 2010 Live Score Card n News-Add-on For Chrome and Firefox Status Bar






Very nice and usefull information I have a good blog but need to take it to the next level. Thanks for this… though I feel a little overwhelmed about the work I still need to do to make it extra optimized.
Excellent! I have been looking for a solution for this now for quite awhile with no luck. The problem seems to be all over the place, but the solutions are just not there, at least for me. This was the only thing that finally worked!
@camping children..
I am glad that you finally found the solution..
If you like my blog please spread the word, you can also comment or suggest anything about this site…
I really appreciate this post. My blog has been showing blank pages for over a month now, and everything I tried failed, but this repair table thing has worked, and I sure appreciate you putting it here for us to find.
i try above but not get solution .
p-comments-post.php not display.
http://www.seekvacationrentals.com/wp-comments-post.php
Hi jyoti,
I would be glad to help u out, if u can explain what problem u r facing.
I tried to visit your site, but its asking for password…
Also, have u tried dropping the comment table and recreating it?
thank you
when i drop my comment table its solved. because my comment table is currupted . so my new problam is how to recover data from currepted sql data.
@ Jyoti
Once you drop the table you can not recover the data coz all data is deleted with the table..
you have to take backup before dropping the table..
Only for this reason I have First asked to repair the table. Dropping the table is last option as some hosting server does not support repairing the tables..
I’ll soon post an article on how to take backup of database for wordpress..
@ Christopher Damba
I suggest you to upgrade your wordpress to version 2.8.4a
because this is a bug in 2.7 and has been resolved in 2.8
Don’t forget to backup your database before upgrading..
this link will help you..
http://codex.wordpress.org/Upgrading_WPMU
i have taken backup. but backup sql is currupeted. and no repaire working proper.
@ Jyoti
Plz tell me your backup file format, then I’ll be able to find a solution for it.
Apparently the problem with this database is the entry of two same primary key in the comment table
All primary key in a table should be unique….
so if we can delete one of the duplicate entry from table, that will solve the problem
@saurabh I upgraded to version 2.8.4a but still getting a blank wp-comments-post.php page after entering comments in a preview post (http://drivelive.cdsm3.co.uk/wordpressmu/?p=113&preview=true). I’ve also tried repairing the comments table wp_1_comments but still the bug reappears.
@ Christopher Damba
I think this is not a bug. when you preview a post, the particular post is not present in the database, so when you post a comment in the preview, wp-comment-post.php could not find the post in the database and thus show a blank page.
And by the way, only administrator can see a preview, you should not worry about this thing because nobody post a comment in the preview.
any other query, I would be glad to help…
The SQL query creates a little issue. The ‘comment-approved’ field has more than one index. So, KEY `comment_approved` (`comment_approved`) it’s a little bit useless.
Regards
Wooohooooo!!!!!!!!!!!
Saurabh, you are a GENIUS! This is such a simple fix (at least for me) and I’ve been googling and on WP forums for two days trying to fix it. Thank you SO much!
Shauna
@Shauna
I m glad you found the solution.. please suggest this link to ppl who are facing this problem…
Shouldn’t you include a warning before step 5 to backup their database or at least the contents of that table? You are instructing your readers to destroy all of the comments people have made on their blog. You should warn them this is what they are doing. Not everyone knows what an SQL DROP statement does.
You are right Matt, I have modified the post and included a warning…
Thanx for the suggestion….
I am still getting the blank page when someone leaves a comment. I have followed your instructions. :-/
Hello, I’ve tried the first solution and it didn’t work. Then, I tried the second solution with the SQL and it didn’t work even after it said the query was completed succesfully. What could be problem? My blog is http://blog.catrinaiscoolbeans.com. I’ve tested it and I’m still getting the blank page.
@ Catrina,
I have tried posting a comment in your blog and its working fine. Can you please tell me in detail, what problem u r facing?
@ Allison
If your blog is wellreadreviews.com, then your comments are working fine, i have posted a comment there..
That is because I backed everything up and did a fresh install with new databases.
I really appreciate this post!!!
I am glad that someone finally found the solution…
Thank you very much saurabh
I did the repair and optimization earlier and have the same problem.
On your Step 5, it asks: “Do you really want to :
DROP TABLE IF EXISTS `wp_comments`;
CREATE TABLE `wp_comments` (
`comment_ID` bigint(20) unsigned
…”
This gets me nervous!
The page I’m having a problem on is http://www.dogsdontlookbothways.com/joeys_blog/2999-dog-hit-by-car-broken-jaw-leg-pelvis/
I also have the page go blank when I change the default user email address in “users and authors” of the admin (me) to the actual email address. When I change it back to you@yourdomain.com, the page shows correctly again.
Jane
Thank you so much Saurabh for the clarification. Much appreciated!
awesome! You guys currently have the same problem with your blog that I was having on mine – if I tried to submit with my version of IE (i’m posting this with FF), I’d get a blank page at “http://www.princeblog.net/wp-comments-post.php#comment-”. Why? Because of a bug in the error handling for the user-agent header. Here’s what I originally wrote (but couldn’t post here with my version of IE):
I had this same problem with IE.
I ran some diagnostics and inserted some print statements in the wp_insert_comment (comment.php).
Basically, my problem was the USER AGENT header; in my version of IE it was “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; Trident/4.0; EmbeddedWB 14.52 from: http://www.bsalsa.com/ EmbeddedWB 14.52; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; MS-RTC LM 8; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 3.0.30729)”
That’s 282 characters. Why’s that important? Because the wp_comments table has a comment_agent field with a length of only 255 characters.
The fix? Run this against your wp_comments table:
ALTER TABLE `wp`.`wp_comments` MODIFY COLUMN `comment_agent` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
Hope this helps!
Hej saurabh didwania
Same problem here, but with all actions I do upon my blog. For example, when I try to preview a post while writing it I get referred to here: http://sundsvallexpress.se/wp-admin/post.php
Try to leave a comment and you will get a similar thing. I can´t also logout.
It looks like the problem is in my DB, but I tried your solution with wp_comments and it didn´t work.
PLZ PLZ PLZ help…
it looks like one of the plugins is causing that problem. I changed the theme and turned off the plugins and the problem disappeared.
Now I am trying to rule out which plugin it was and see how to fix that.
Hi Saurabh, I have the same issue with wp-comment-post- I am using php-cgi lines in the files, this is a fresh install of 2.9.2 and so I am using the default theme and no plugins. When I am logged in as an admin I can post the comments, but when someone else tries to comment, the error message displayed is 500. However, when I go back to the post and refresh I see that the comment is posted. So I think it is the redirect(after commenting) to the post is not happening. What could be going wrong, please suggest. I have tried to empty DB(as it was a fresh install) and even tried to reinstall; but nothing helps. Any help would be greatly appreciated.
Thanks very much.
Priyanka
All I did was replace the php file with a new one. Problem solved !
Thank you huge!. I upgraded wp to 2.9 and searched high and low for the blank page comment solution and nothing worked until this. The repair table didnt do anything I had to run the sql command ubove then it worked.
FYI, that “repair table” action breaks Wordpress’ new threaded-comment functionality.
Hi everyone- had a very similar problem…when publishing a new comment users were receiving a 404. Looked at the comments DB table and for some reason it had stopped auto-incrementing itself.
I changed the ‘comment_ID’ id column to Auto Increment and it seems to work okay now. New comments are saving correctly.
Thanks for such a nice info..
Nope. It doesn’t work. I’m gonna cry now :’(
Hi Priyanka,
Sorry, couldn’t reply earlier. I hope your problem is solved by now, but if not then here is my suggestion.
For your blog it seems as the problem is with the theme or one of the php files. Try replacing your comments.php with original file. This should solve you problem.
Let me know the results..
Wow ! thank you.
nice site