• 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 8 replies - 16 through 23 (of 23 total)
  • I had a similar problem. It seemed that I did not have all my plugins disabled when I used the upgrade script. I lost all my categories like you did.

    I wrote a post about this issue and how to solve it on my blog: https://www.hskupin.info/2007/09/27/upgrade-to-wordpress-23/

    Alright, I’ve tried (I believe) everything listed here. I can successfully rollback my DB and blog to prior version 2.0, and I’ve ensured that all add-ons are turned off. Every time I run the upgrade script (after restoring), I see the same symptom as above – wp_terms not defined. I’ve tried to force a DB change, and that’s where it seems something is not occurring correctly: my original db_version is 3308. No matter if I run the upgrade or manually update db_version on the DB to a different value (like 3441), it never gets set to the “new” 2.3 version of 6124 when running the upgrade.

    I notice that 3308 is not listed on the list of “standard” WordPress releases for db_version values. Do I have a pre-release, or beta version of 2.0, and is that possibly keeping the update script from operating correctly?

    If so, would manually creating the wp_terms et al tables help me out? Can anyone out there grab the Create SQL for the three new tables off of a backup of a 2.3 DB and post it here?

    I’m back again, and this time with a tale of success. My operating theory is still that the upgrade script somehow was confused by the version number on my DB (which was 3308) – I’m guessing that my prior WordPress version was a pre-official 2.0 release, as 3308 isn’t listed in the entries I’ve seen as one of the standard values.

    Anyway…after being frustrated, restoring many times, attempting to upgrade many times, I did this:

    1. Restored to prior working version – both DB and WordPress files
    2. Logged out of Admin on my blog and made sure all plug-ins disabled
    3. Deleted all WordPress 2.0 files on my server using FileZilla
    4. Copied all WordPress 2.3 files to the server (including new wp_config containing several new variables)
    5. Went into phpMyAdmin and updated db_version in wp_options table from 3308 to 3441 (which should indicate WordPress 2.0)
    6. Navigated to my blog. It appeared screwy, but I was able to utilize the Admin link to login
    7. Once logged in, the “Your database is out of date and must be updated” message was displayed. I then used the link shown to upgrade the DB.
    8. Voila’! Everything is up!

    I probably could have used the upgrade.php script, but had tried that several times before with no success. I really think the key here was changing the value of db_version to 3441 prior to trying the DB upgrade the first time. If I ran the upgrade script with a db_version of 3308, the forced DB upgrade would never work after that – no matter what I changed the value of db_version to.

    One last thing: after upgrading I was seeing a number of special characters in unusual places in my existing posts. After looking through the forums a bit, I realized that I the additions I had made to wp_config were causing the problem. Specifically, do NOT add the following to your wp_config for a DB upgrade:

    define(‘DB_CHARSET’, ‘utf8’);
    define(‘DB_COLLATE’, ”);

    Over and out.

    I just delete my cache from WP-Cache and everything worked fine after that.

    Hi,

    I found this issue extremely annoying. However, I realize I had forgotten to disable plugins. And the common plugin “Google Sitemap Generator” did not work with WordPress 2.3. I deactivated the plugin, rolled back the database as described, and replaced that plugin with the newest one. My install is happy now.

    Thank you for your step by step post! I wouldn’t have been able to fix things without it but this worked for me. The last two wordpress upgrades have been horrible — I think I’m going to hang here for awhile at 2.3.

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