Title: database error &#8211; Incorrect key file
Last modified: August 18, 2016

---

# database error – Incorrect key file

 *  [shui](https://wordpress.org/support/users/shui/)
 * (@shui)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/database-error-incorrect-key-file/)
 * I have a site for a few months with wordpress1.5.2. Today I encountered the following
   problem when I tried to edit any of my posts:
 * WordPress database error: [Incorrect key file for table ‘wp_posts’; try to repair
   it]
    SELECT * FROM wp_posts WHERE ID=5
 * WordPress database error: [Incorrect key file for table ‘wp_posts’; try to repair
   it]
    SELECT * FROM wp_posts WHERE ID=5
 * What do I need to do in order to correct the database?
    thanks,

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

 *  [Austin Matzko](https://wordpress.org/support/users/filosofo/)
 * (@filosofo)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/database-error-incorrect-key-file/#post-400069)
 * If you have PHPMyAdmin, try using it to repair the database, or ask your host
   to do it.
 *  [bgreeson](https://wordpress.org/support/users/bgreeson/)
 * (@bgreeson)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/database-error-incorrect-key-file/#post-400559)
 * I too have encountered this same problem and according to a search on Google 
   a number (actually several hundred) have too.
 * I encountered the problem when going through some posts to update some images
   that were inserted. I moved all of the images that I have used in various posts
   into a different folder and wanted to go through my blog to update the source
   of each image.
 * After providing the correct source for the image (using the WYSIWYG wordpress
   editor) and clicking on SAVE, my page shows the following error:
 * WordPress database error: [Incorrect key file for table ‘wp_posts’; try to repair
   it]
    UPDATE IGNORE wp_posts SET post_author = ‘1’, post_date = ‘2006-05-18 15:
   33:06’, post_date_gmt = ‘2006-05-18 19:33:06’,
 * (CONTENT)
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/hickory/public_html/blog/wp-includes/wp-db.php:102) in /home/hickory/
   public_html/blog/wp-admin/post.php on line 127
 * Can someone please advise how I can rectify this issue without loosing all of
   my posts & content. I do not have a backup of mysql database and I do have access
   to PHPMYADMIN for mysql. My host runs the latest version of CPANEL.
 *  [bgreeson](https://wordpress.org/support/users/bgreeson/)
 * (@bgreeson)
 * [20 years, 3 months ago](https://wordpress.org/support/topic/database-error-incorrect-key-file/#post-400561)
 * Well.. I figured the issue out myself. My host updated MYSQL today and there 
   were some ‘bugs’ with the old system and new system. Using CPANEL’s DATABASE 
   feature, I ‘repaired’ my WordPress database. Everything is working now!

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

The topic ‘database error – Incorrect key file’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [bgreeson](https://wordpress.org/support/users/bgreeson/)
 * Last activity: [20 years, 3 months ago](https://wordpress.org/support/topic/database-error-incorrect-key-file/#post-400561)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
