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.
Help!?
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:
http://www.google.com/search?q=recover+a+corrupt+mysql+database
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.