Search code examples
phpmysqldatabasewordpresscorrupt

Wordpress wp_options table corrupts periodically


I have a problem about wp_options table. Firstly my wp_options table was corrupted. I'm getting the following error:

"wp_options.MYD' not found (Errcode: 2 "No such file or directory")

because of this I can't repair that table.

My solutions was restoring that table from previous backup. It worked for 30min or 1 hour, after that it corrupted again and I am getting same error (errcode:2) again.

I disabled plugins that gives PHP errors. I tried again and again. Always same table corrupts.

Now I don't get any PHP errors. WordPress gives DB connection error naturally. Why this table corrupts periodically? What could cause this?


Solution

  • You can switch the database engine to InnoDB.

    It doesn't corrupt on server restarts or crashes, and is more stable in general.

    Wordpress should still work fine, you just need to alter your current table to engine=InnoDB.