WordPress 2.5 upgrade

March 31st, 2008

We have finally upgraded WordPress!

Whenever I previously tried to do it, MSQL returned:

WordPress database error: [Duplicate entry '1'
for key 1]
INSERT INTO wp_terms (term_id, name, slug, term_group)
VALUES ('1', 'In', 'in-2', '1')

WordPress database error: [Duplicate entry '1-category'
for key 2]
INSERT INTO wp_term_taxonomy (term_id, taxonomy, description,
parent, count) VALUES ('1', 'category', '', '0', '22')

WordPress database error: [Duplicate entry '2' for key 1]
INSERT INTO wp_terms (term_id, name, slug, term_group)
VALUES ('2', 'Administravia', 'administravia-2', '1')

WordPress database error: [Duplicate entry '2-category'
for key 2]
INSERT INTO wp_term_taxonomy (term_id, taxonomy, description,
parent, count) VALUES ('2', 'category', '', '0', '6')

WordPress database error: [Duplicate entry '3' for key 1]
INSERT INTO wp_terms (term_id, name, slug, term_group)
VALUES ('3', 'The Law', 'the-law-2', '1')

Which resulted in an upgraded WordPress, with 1000 posts that were all Uncategorized.

Eventually, after reading up and doing some dry runs, I discovered the solution:

  • Back everything up, deactivate plugins.
  • Upload the new WordPress files.
  • Truncate the wp-terms table.
  • Truncate the wp-taxonomy table.
  • run the wp-admin/upgrade.php script.

It works!

Leave a Reply

You must be logged in to post a comment.