Title: Missing Table &#8211;  wp_termwp_relationships
Last modified: August 19, 2016

---

# Missing Table – wp_termwp_relationships

 *  [computerpeach](https://wordpress.org/support/users/computerpeach/)
 * (@computerpeach)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/)
 * I was missing my categories and tags and after digging around I am missing my
   wp_termwp_relationships table.
 * Any clue on how to fix this? Even If I have to manually re-populate the table
   manually – that is fine.

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

 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969227)
 * You can recreate the table easily enough, but the data in the table will be a
   problem. Did you recently do anything that may have resulting in losing that 
   table? Move the site, or dump/import the database for some reason? Tables usually
   don’t just disappear.
 *  Thread Starter [computerpeach](https://wordpress.org/support/users/computerpeach/)
 * (@computerpeach)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969352)
 * I was cleaning up some plugins that I was not using and clearing out databases
   that I didn’t need. Evidently I checked this one by mistake.
 * I do have a database backup plugin, but when I go to restore the database, it
   says it fails.
 * I am at a loss on what to do.
 *  [lutfiallail](https://wordpress.org/support/users/lutfiallail/)
 * (@lutfiallail)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969369)
 * Did your database have option –add-drop-table?
    If did you just import the database
   backup, if did’nt you should remove all table first, then import the database
   backup.
 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969385)
 * > I do have a database backup plugin, but when I go to restore the database, 
   > it says it fails.
 * Do you have a backup you made using that plugin? If so, then you should be able
   to open it in a text editor, find the table entries and restore them.
 *  Thread Starter [computerpeach](https://wordpress.org/support/users/computerpeach/)
 * (@computerpeach)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969406)
 * Well… I thought my plugin was working correctly (I was getting weekly emails).
   Evidently it wasn’t so I don’t have a backup now.
 * Should I just export my wordpress files and then install a new fresh copy with
   a new database. I am thinking at this point that is the only thing I can do. 
   If this is the case, any pointers would be greatly appreciated.
 *  [figaro](https://wordpress.org/support/users/figaro/)
 * (@figaro)
 * [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969410)
 * You could do that, but I’m not sure the data will be recreated. If that table
   is the only one missing, then you could just recreate it. The sql for creating
   the table is below…you could copy that, past into a text file using notepage,
   rename the file with a .sql extension and then import it into your database to
   recreate the table. Again, you won’t have the data, so I **assume** you would
   need to re-tag and categorize your posts. I’m just making some assumptions that
   you can’t get this data back…there may be a way to get these relationships back,
   but I’ve never experimented with it.
 *     ```
       CREATE TABLE IF NOT EXISTS <code>wp_term_relationships</code> (
         <code>object_id</code> bigint(20) NOT NULL default '0',
         <code>term_taxonomy_id</code> bigint(20) NOT NULL default '0',
         <code>term_order</code> int(11) NOT NULL default '0',
         PRIMARY KEY  (<code>object_id</code>,<code>term_taxonomy_id</code>),
         KEY <code>term_taxonomy_id</code> (<code>term_taxonomy_id</code>)
       ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
       ```
   

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

The topic ‘Missing Table – wp_termwp_relationships’ is closed to new replies.

## Tags

 * [categories](https://wordpress.org/support/topic-tag/categories/)
 * [tags](https://wordpress.org/support/topic-tag/tags/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [figaro](https://wordpress.org/support/users/figaro/)
 * Last activity: [17 years, 4 months ago](https://wordpress.org/support/topic/missing-table-wp_termwp_relationships/#post-969410)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
