Portal Home > Knowledgebase > Articles Database > Wordpress Upgrade - Help with database error


Wordpress Upgrade - Help with database error




Posted by grandad, 03-23-2008, 05:11 PM
I have upgraded a few Wordpress Blogs to the latest version without any problems but one site has come up with a database error. The error I get is:- Now when I check phpmyadmin and go to the database I can find 'wp-terms (term_id, name, slug, term_group)' but when it says 'INSERT INTO', I am unsure of where the values should be entered. The error advice mentions 'key 1' but I don't know what/where 'key 1' is or where it is to be found. Anyone give any explicit help on this one please?

Posted by tix3, 03-23-2008, 05:24 PM
Well the error says that there is already an entry with the unique id '1'

Posted by grandad, 03-23-2008, 05:27 PM
So what do I do to resolve the problem?

Posted by tix3, 03-23-2008, 05:40 PM
From googling i see thats a common problem for updating to 2.3.1. The suggestiong are: 1)TAKE A BACKUP 2)TAKE A BACKUP 3)disable ALL plugins 4)retry to upgrade

Posted by Dualism, 03-23-2008, 06:14 PM
Have you tried a repair in phpmyadmin ?

Posted by grandad, 03-23-2008, 06:15 PM
No, I haven't done anything further.

Posted by grandad, 03-23-2008, 06:26 PM
Just did a repair - each item came back 'ok' but the same problem exists.

Posted by tix3, 03-23-2008, 06:30 PM
have you disabled the plugins in wordpress ?

Posted by grandad, 03-23-2008, 06:33 PM
I don't have access, wp-admin just leads to a "Database Upgrade" page and then the error page.

Posted by foobic, 03-23-2008, 09:59 PM
Best option would be to revert to the backup you took before attempting the upgrade, disable all plugins and try again... But if you can't do that, take another backup now and then try: and assuming that it's the "Uncategorized" category, Background: the error is telling you that the upgrade program is trying to insert a new record for "Uncategorized" but it fails because one already exists.

Posted by grandad, 03-24-2008, 12:33 PM
Can't get this bit to appear anywhere, or do I have to manually enter it?

Posted by tix3, 03-24-2008, 01:12 PM
Select database in phpmyadmin. Select sql tab. Type it. Press run.

Posted by grandad, 03-24-2008, 01:24 PM
Doesn't change anything.

Posted by grandad, 03-26-2008, 04:37 AM
A great many thanks to foobic for helping me to satisfactorily resolve this issue and get my blog fully back in action.

Posted by foobic, 03-26-2008, 07:39 AM
Glad it's sorted for you grandad For the benefit of anyone else who may have the same issue, the old(ish) db_version number caused the Wordpress upgrade program to go through the conversion process from wp_categories to wp_terms. But wp_terms and its associated tables wp_term_relationships and wp_term_taxonomy already contained data, presumably from an earlier abortive upgrade. With those 3 tables all emptied the upgrade went through ok.

Posted by Nnyan, 03-26-2008, 04:18 PM
Glad to see foobic was able to help you out (He's one of the good guys on WHT)! I hope you follow the advice on this thread and always take a backup and disable all your plugins/themes before you do an upgrade. Not doing this should not cause a problem most of the time but why take the risk eh? I also suggest using the WP Backup Plugin to backup your WP, it's been a life saver on more then one occasion.

Posted by grandad, 03-26-2008, 05:18 PM
There was a backup but it got deleted in error! The WP Backup Plugin shows compatible to 2.3.1 not the current release of 2.3.3.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Steven (Rack 911) (Views: 696)
iptables command? (Views: 610)
webnx.com down ? (Views: 649)

Language: