Title: SQL Table Structure
Last modified: August 19, 2016

---

# SQL Table Structure

 *  [Krissy](https://wordpress.org/support/users/krissy/)
 * (@krissy)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/)
 * After 4 years of archives, and absolutely no issues with WordPress at all. My
   database has become corrupt. I’ve installed a fresh one (2.7.1) through my Fantastico
   host and I’ve managed to import all of my old articles. However, there are a 
   few tables that are corrupt and untouchable. wp_optioins, wp_terms and wp_comments.
   I figure I’d cut my losses there.
 * So anyway – I’m an organizational freak and I’ve been through just about every
   structure I could get my hands on. Which table in the SQL are the CATEGORIES 
   located on?
 * And why do I have the itching feeling that it’s on one of the corrupt structures?
 * HELP?

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078665)
 * wp_terms
 * reference:
    [http://codex.wordpress.org/Database_Description](http://codex.wordpress.org/Database_Description)
 * .. and while we are at, can you describe “corrupt”? tables crash, they dont corrupt.
   
   Furthermore, crashed tables are repairable in nearly all circumstances, either
   from phpmyadmin, or some other gui based tool, and most definitely from the cli,
   since you can stop mysql to do it. (if your root, that is).
 *  Thread Starter [Krissy](https://wordpress.org/support/users/krissy/)
 * (@krissy)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078666)
 * DAMN!
 * MySQL said:
 * #145 – Table ‘./username_wrdp/wp_terms’ is marked as crashed and should be repaired
 * That’s the error I get with it. Is there any way to repair it? The wp_term_relationships
   and wp_term_taxonomy tables appear to be fine. It’s just the initial wp_terms
   one that has crapped out on me.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078667)
 * Heres one way:
 * To Check:
 *  1. Login to phpMyAdmin.
    2. Select the database and click on ‘Structure’ tab.
   3. Right under the list of table there is a “Check All” link. Click on it to 
   select all tables. 4. From a “With selected:” drop-down menu right next to it,
   choose “Check table”.
 * To Repair:
 *  1. Login to phpMyAdmin
    2. Choose the affected database. If you only have one
   database, it should choose it by default so you don’t need to do anything. 3.
   In the main panel, you should see a list of your database tables. Check the boxes
   by the tables that need repair. 4. At the bottom of the window just below the
   list of tables, there is a drop down menu. Choose “Repair Table”
 * —
 *  Thread Starter [Krissy](https://wordpress.org/support/users/krissy/)
 * (@krissy)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078670)
 * Awesome! I was able to repair the old tables (but WordPress still wouldn’t properly
   work for me) so I imported them to the new installation and everything appears
   to be fine now.
 * Thank you so much for your help!
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078671)
 * yer welcome 🙂

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

The topic ‘SQL Table Structure’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [sql](https://wordpress.org/support/topic-tag/sql/)
 * [table structure](https://wordpress.org/support/topic-tag/table-structure/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 5 replies
 * 2 participants
 * Last reply from: [whooami](https://wordpress.org/support/users/whooami/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/sql-table-structure/#post-1078671)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
