Are you seeing this message when you try to add a new post to your WordPress site?  Have you recently moved to a new server?  If the answer to BOTH questions is yes this might be the solution.

I was recently seeing this on a WordPress site that had been moved to another server.  I was very careful to make all of the necessary changes to the database.  Tested it before moving the domain.  Everything looked great.  A short time passed and I went to add a new post and was met with this error.  I was also seeing some random odd errors for a plugin as well, but it was only complaining and didn’t offer any clue about what was actually wrong.  If you search it out you’ll find many different sites explaining various steps to take to fix it.  Some even correctly say it’s a database problem.  I tried everything and nothing proved to help my situation.  I’m not at all saying none of these solutions won’t work in certain instances, I’m sure they will, otherwise why would someone post it?  It just didn’t help mine.

Then I stumbled on this in Stack Overflow which gave me a clue.  I didn’t follow the steps outlined here but did scan my database tables and found all of the ID’s that are supposed to be unique numbers for each record and set to auto_increment were not in fact set that way.  A few were but most were not.  Looking at the records I found all of the ID’s were set to ‘0’.  Apparently there is some sort of “option” when importing database tables that ignores setting auto_increment.  I’ve never run into this before and find that very odd you would ever want that option for any reason.  I’ve not taken the time yet to research it out so it’s possible it was a bug somewhere as well.  BUT the required fix was to edit each database table and change the unique ID records to auto_increment.  After which the database properly renumbered all of the ID’s to sequential order and things now seem to be operating as expected.  I may yet run into a problem later if a record points to the wrong ID number now, that remains to be seen.  I may opt to re-import the entire database again and pay close attention whether auto_increment is being properly set.  That would at least help insure there won’t be future errors with incorrect ID references.

Anyway, this was my experience.  If you recently moved to a different server I suggest checking this possibility.  If this is the case for you as well, try doing another import on you database first rather than manually editing each table.

Good luck!

Follow comments on this post with this RSS 2.0 feed.
Leave a comment, or trackback from your own site.

You must be logged in to post a comment.

. . :   design & hosting by creed3.com   : . .