The weirdest Wordpress problem ever I think. A clients site with a large database of posts has got a mind of it's own. One minute everything seems fine, the next posts, categories and tags are missing.

At the minute the dashboard is telling me there's 2309 posts in 9 categories but when I click the categories link in admin there's none in the list.

I can see all posts in admin but whereas they used to be assigned to categories and have tags listed, they're all now "Uncategorized" with "No Tags".

Obviously the wordpress database is corrupt in some way but where to start to try fix it!?

Here's what I've tested so far:

Plugins – I turned off all current plugins. Theme – I tried a different theme/template. Wordpress Core – I re-uploaded the latest wordpress version. Updates – I updated all plugins and wordpress core. Repair Database - I checked and tried to repair the database in Cpanel but it timed out.


1 Answer 1


You're probably running into the joys of MySQL's MyISAM engine...

From within MySQL (or PhpMyAdmin), use REPAIR TABLE xyz statements again, repeatedly, on each of your tables (or rather, your terms related tables, since these are the ones that sound corrupt) to see if this solves anything.

If those fail, there are a few documented workarounds:


Once things are recovered, run OPTIMIZE TABLE xyz statements on each table, and then alter the engine of the database and each table to make it use InnoDB. InnoDB clutters the catalog somewhat (especially if you drop a database or large tables), but -- being ACID compliant -- it's a hell of a lot less error prone than MyISAM.

  • 2
    and make sure to have a backup dude ! Oct 22, 2010 at 0:23
  • Denis, I think you might just have saved my life! That seemed to work fine..One question - Is there a quick way to convert a whole database to InnoDB?
    – Leon Quinn
    Oct 22, 2010 at 1:03
  • Not that I'm aware of. You need to ALTER each table. And if memory serves, also ALTER the database so new tables are set to innodb by default. Oct 22, 2010 at 1:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.