Title: WordPress database error: [Incorrect file format &#8216;wp_comments&#8217;]
Last modified: August 18, 2016

---

# WordPress database error: [Incorrect file format ‘wp_comments’]

 *  [mayvelous](https://wordpress.org/support/users/mayvelous/)
 * (@mayvelous)
 * [20 years ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/)
 * Hello I’m having these database errors through out the whole site.
 * Every admin page showing the follow errors at the top of the page.
 * > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT COUNT(*)
   > FROM wp_comments WHERE comment_approved = ‘0’
 * >  WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT COUNT(
   > comment_ID) FROM wp_comments WHERE comment_approved = ‘spam’
 * All other pages with comments or comment sections also giving out the following
   errors.
 * >  WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT COUNT(*)
   > FROM wp_comments WHERE comment_post_ID = ‘153’
   > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT * FROM
   > wp_comments WHERE comment_post_ID = ‘153’ AND comment_approved = ‘1’ ORDER 
   > BY comment_date
 * Once submit new comment I’m getting this errors.
 * >  WordPress database error: [Incorrect file format ‘wp_comments’]
   >  DELETE FROM
   > wp_comments WHERE DATE_SUB(‘2006-04-02 23:54:15’, INTERVAL 15 DAY) > comment_date_gmt
   > AND comment_approved = ‘spam’
   > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT comment_ID
   > FROM wp_comments WHERE comment_post_ID = ‘153’ AND ( comment_author = ‘May’
   > OR comment_author_email = ‘mayvelous@gmail.com’ ) AND comment_content = ‘test’
   > LIMIT 1
   > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT comment_date_gmt
   > FROM wp_comments WHERE comment_author_IP = ‘202.62.123.178’ OR comment_author_email
   > = ‘mayvelous@gmail.com’ ORDER BY comment_date DESC LIMIT 1
   > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  INSERT INTO
   > wp_comments (comment_post_ID, comment_author, comment_author_email, comment_author_url,
   > comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved,
   > comment_agent, comment_type, comment_parent, user_id) VALUES (‘153’, ‘May’,‘
   > mayvelous@gmail.com’, ‘[http://www.mayvelous.com&#8217](http://www.mayvelous.com&#8217);,‘
   > 202.62.123.178’, ‘2006-04-02 23:54:15’, ‘2006-04-02 23:54:15’, ‘test’, ‘1’,‘
   > Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 
   > Firefox/1.5.0.1’, ”, ‘0’, ‘1’)
   > WordPress database error: [Incorrect file format ‘wp_comments’]
   >  SELECT COUNT(*)
   > FROM wp_comments WHERE comment_post_ID = ‘153’ AND comment_approved = ‘1’
   > WordPress database error: [You have an error in your SQL syntax; check the 
   > manual that corresponds to your MySQL server version for the right syntax to
   > use near ‘WHERE ID = ‘153” at line 1]
   >  UPDATE wp_posts SET comment_count = 
   > WHERE ID = ‘153’
   > WordPress database error: [You have an error in your SQL syntax; check the 
   > manual that corresponds to your MySQL server version for the right syntax to
   > use near ” at line 1]
   >  SELECT * FROM wp_comments WHERE comment_ID = ;
 * Any idea how to solve this problem? I got that on WP 2.0.1 and now I’ve updated
   to 2.0.2 and still happening. It was fine before but I don’t know how or what
   causes it to show those errors.
    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [palmdoc](https://wordpress.org/support/users/palmdoc/)
 * (@palmdoc)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368193)
 * Hi I am facing the same problem as well.
 * WordPress database error: [Incorrect file format ‘wp_posts’]
    SELECT * FROM wp_posts
   WHERE ID = ‘1187’ LIMIT 1
 * Help!
 *  [jaketeamseacatscom](https://wordpress.org/support/users/jaketeamseacatscom/)
 * (@jaketeamseacatscom)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368194)
 * Same problem here. I got an email request to moderate a comment from my site…
   the comment was blank as was the IP address. I went to my site to moderate the
   comment and I saw the same errors all over my site;
 * WordPress database error: [Incorrect file format ‘wp_comments’]
 * My PHP database repair utility said that there was an error that the comment 
   table was not closed properly and was being used by two users. I let it automatically
   repair it and now WordPress is saying it needs to be installed with a link to
   install.php Did I just get hacked? I hid the install.php file so I can sort this
   out before some idiot clicks on it.
 * [http://www.teamseacats.com](http://www.teamseacats.com)
 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368195)
 * OK guys, when are you going to start deactivating plugins before the install?
 * Deactivate all plugins – reactivate one by one, testing in between.
 *  [jaketeamseacatscom](https://wordpress.org/support/users/jaketeamseacatscom/)
 * (@jaketeamseacatscom)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368196)
 * did it, done it. Site worked great for days since the upgrade and immediately
   after the email of a blank comment for moderation, things crashed.
 *  [ranzino](https://wordpress.org/support/users/ranzino/)
 * (@ranzino)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368197)
 * Same error, mine crashed over the weekend. I changed absolutely nothing on my
   end. It had been working fine for nearly seven months. Any other insight into
   this?
 *  [jaketeamseacatscom](https://wordpress.org/support/users/jaketeamseacatscom/)
 * (@jaketeamseacatscom)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368198)
 * It appears to be some sort of database error on my problem – although the email
   with a blank comment to be moderated is strange. However, after several attempts
   to reload a backup of the tables, I finally ended up deleting all the tables 
   in my PHP WordPress database, reinstalling WordPress (it rebuilt the tables) 
   and THEN restoring a backup. I got everything back minus one post.
 *  [jaketeamseacatscom](https://wordpress.org/support/users/jaketeamseacatscom/)
 * (@jaketeamseacatscom)
 * [19 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368201)
 * OK, in my case, it now looks like the FAlbum plugin I had installed was beating
   the heck out of my database. I un-installed and will see.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘WordPress database error: [Incorrect file format ‘wp_comments’]’ is closed
to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [format](https://wordpress.org/support/topic-tag/format/)
 * [incorrect](https://wordpress.org/support/topic-tag/incorrect/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 5 participants
 * Last reply from: [jaketeamseacatscom](https://wordpress.org/support/users/jaketeamseacatscom/)
 * Last activity: [19 years, 1 month ago](https://wordpress.org/support/topic/wordpress-database-error-incorrect-file-format-wp_comments/#post-368201)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
