Title: Major WordPress database error
Last modified: August 19, 2016

---

# Major WordPress database error

 *  [khhardaway](https://wordpress.org/support/users/khhardaway/)
 * (@khhardaway)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/major-wordpress-database-error/)
 * My WP site looks totally crashed. Every page returns a 404 error and says the
   following:
 * > WordPress database error: [Table ‘wp_posts’ is marked as crashed and should
   > be repaired]
   >  SELECT DISTINCT * FROM wp_posts WHERE 1=1 AND post_date_gmt <
   > = ‘2008-09-07 19:41:59’ AND (post_status = ‘publish’) AND post_status != ‘attachment’
   > GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 999
 * Any help would be greatly appreciated! 🙂
 * Keith

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

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [17 years, 9 months ago](https://wordpress.org/support/topic/major-wordpress-database-error/#post-852321)
 * I’m hoping you have backups of your database as a “just in case”…
 * Can you log into your blog? If so, try installing Lester Chan’s [WP-DBManager](http://wordpress.org/extend/plugins/wp-dbmanager/).
   I think that has a repair DB option.
 * Good luck.
 *  Thread Starter [khhardaway](https://wordpress.org/support/users/khhardaway/)
 * (@khhardaway)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/major-wordpress-database-error/#post-852412)
 * Thanks Jan. I tried out the WP-DBManager but I didn’t see any option to repair
   the DB.
 * I looked at the DB in phpmyadmin and it looked like the ‘wp_posts’ table got 
   totally corrupted. I don’t know what happened.
 * Fortunately I do have backups. I just created a whole new database and copied
   all the wp tables into it. Everything seems fine now.

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

The topic ‘Major WordPress database error’ is closed to new replies.

## Tags

 * [crashed](https://wordpress.org/support/topic-tag/crashed/)
 * [WordPress database error](https://wordpress.org/support/topic-tag/wordpress-database-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [khhardaway](https://wordpress.org/support/users/khhardaway/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/major-wordpress-database-error/#post-852412)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
