WordPress.org

Support

Support » Installation » wp_terms’ doesn’t exist ERROR upgrading to 2.3

wp_terms’ doesn’t exist ERROR upgrading to 2.3

  • I recently upgraded to latest version and categories and archieves dissapeared. Let me say that I had posts in more that one category. On my page I have this error several times:

    (just a note: mainsite = username , mysite = my site address)

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    SELECT t.*, tt.* FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘category’) AND tr.object_id IN (171) ORDER BY t.name ASC

    If I try to edit a post and save I have this error:

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    SELECT t.term_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘category’) AND tr.object_id IN (166) ORDER BY t.name ASC

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    SELECT t.name FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘post_tag’) AND tr.object_id IN (166) ORDER BY t.name ASC

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT tr.term_taxonomy_id FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN (166) AND tt.taxonomy IN (‘category’) ORDER BY tr.term_taxonomy_id ASC

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    SELECT term_id FROM wp_terms as t WHERE t.term_id = ‘1’

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    SELECT term_id FROM wp_terms as t WHERE t.slug = ‘1’

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (name, slug, term_group) VALUES (‘1’, ‘1’, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    SELECT tt.term_taxonomy_id FROM wp_term_taxonomy AS tt INNER JOIN wp_terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = ‘category’ AND t.term_id = 0

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (‘0’, ‘category’, ”, ‘0’, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = ‘166’ AND term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (‘166’, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT COUNT(*) FROM wp_term_relationships, wp_posts WHERE wp_posts.ID = wp_term_relationships.object_id AND post_status = ‘publish’ AND post_type = ‘post’ AND term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    UPDATE wp_term_taxonomy SET count = ” WHERE term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    SELECT term_id, taxonomy FROM wp_term_taxonomy WHERE term_taxonomy_id IN (0)

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT tr.term_taxonomy_id FROM wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tr.object_id IN (166) AND tt.taxonomy IN (‘post_tag’) ORDER BY tr.term_taxonomy_id ASC

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    INSERT INTO wp_terms (name, slug, term_group) VALUES (”, ”, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_terms’ doesn’t exist]
    UPDATE wp_terms SET slug = ‘0’ WHERE term_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    SELECT tt.term_taxonomy_id FROM wp_term_taxonomy AS tt INNER JOIN wp_terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = ‘post_tag’ AND t.term_id = 0

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    INSERT INTO wp_term_taxonomy (term_id, taxonomy, description, parent, count) VALUES (‘0’, ‘post_tag’, ”, ‘0’, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT term_taxonomy_id FROM wp_term_relationships WHERE object_id = ‘166’ AND term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    INSERT INTO wp_term_relationships (object_id, term_taxonomy_id) VALUES (‘166’, ‘0’)

    WordPress database error: [Table ‘mainsite.wp_term_relationships’ doesn’t exist]
    SELECT COUNT(*) FROM wp_term_relationships, wp_posts WHERE wp_posts.ID = wp_term_relationships.object_id AND post_status = ‘publish’ AND post_type = ‘post’ AND term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    UPDATE wp_term_taxonomy SET count = ” WHERE term_taxonomy_id = ‘0’

    WordPress database error: [Table ‘mainsite.wp_term_taxonomy’ doesn’t exist]
    SELECT term_id, taxonomy FROM wp_term_taxonomy WHERE term_taxonomy_id IN (0)

    Warning: Cannot modify header information – headers already sent by (output started at /var/www/virtual/mysite.net/htdocs/wp-includes/wp-db.php:160) in /var/www/virtual/mysite.net/htdocs/wp-includes/pluggable.php on line 390

    If I change the theme and deactivate all the plugins I have the same error, it`s not from a plugin. PLEASE HELP. Thanks!

Viewing 15 replies - 1 through 15 (of 23 total)
  • did u run upgrade.php?

    Of course I did! Don`t know what to do 🙁

    Any ideas?

    Try running the upgrade.php again. If that doesn’t work, force a database update. If that doesn’t work, I’d be tempted to drop all the tables in your database and restore your database backup before doing the upgrade again.

    I forced that DB update and it worked (no errors now). Thanks!

    Still, all my categories dissapeared and now all my posts are “uncategorized”. In “Manage” -> “Categories” from the admin menu I have no categories 🙁

    Can I get them back somehow or I`ve lost all of them? 🙁

    One ugly possibility–
    Backup your database.
    Drop the table.
    Restore your database to pre-2.3 upgrade.
    Redo the upgrade.

    I exported the DB from SQL Admin but I dont know if thats a good thing to do. Is there any way to see in the exported DB file is there is one or more categories before I do that? (because it could be useless)

    And what table should I drop?

    Usually you can use a Text editor to look at the sql export.

    I’m suggesting dropping all the WordPress tables before you restore.

    Done, but its still no use. No upgrade needed after I restored, I forced again the upgrade and <strong>still no categories</strong>. I dont know what happened with my categories 🙁 I had like 10-15 and now are gone 🙁

    Moderator Dion Hulse

    @dd32

    Lead Developer

    If for some reason your terms table wasnt created during the upgrade proceedure, then the following queries to move categories from your old table to the new table would’ve failed.
    It seems that WP doesnt reconise that an error occcured (And i wouldnt have a clue why the table creation failed unless the mysql user didnt have create privledges) and then continues to delete the old category tables (as it expected them to be transfered to the new table)

    So, If the wp_Category tables dont exist still, and you didnt backup your database before doing the upgrade, you’re just going to have to re-categorise, (and might as well tag everything too).

    Im creating again the categories, it will take some time to edit the posts and stuff.... but its the only solution. Thanks for all the help but, in my opinion, wordpress 2.3 should have been tested much more. The released was rushed, with many bugs – despite of the beta ones. Things go on…

    foolswisdom

    @foolswisdom

    Moderator

    Tested much more by whom? Did you test it?

    This sounds like a very frustrating situation, and I take it you don’t have a backup of your database from *before* upgrading? Or an export in the WordPress WXR format?

    Without a backup of your database from before, I don’t see how we can help diagnose your problem further.

    Moderator Mark Jaquith

    @markjaquith

    Is it possible that you don’t have the CREATE MySQL priv?

    I had the same problem, indeed WP did not recognize the faulty conversion.
    http://wordpress.org/support/topic/135680?replies=3#post-621125

    I had the same database error(something with siteblog_wpterms does noet exist), I called up the upgrade.php file… I thought that was missing, because usuallly after an upgrade you get the upgrade database page, but I didn’t get it this time.

    So I guess that the people who didn’t get that page after upgrading, should call up the page themselves. After that everything worked fine.

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘wp_terms’ doesn’t exist ERROR upgrading to 2.3’ is closed to new replies.
Skip to toolbar