Website support, maintenance and fixes for UK businessesCall 0208 088 8371info@websupportservices.co.uk

HomeWordPress errorsTable Is Marked as Crashed: How to Repair WordPress

Table Is Marked as Crashed: How to Repair WordPress

The message "Table 'wp_options' is marked as crashed and should be repaired" means the database engine has detected corruption in a table WordPress needs. It is a database fault, so the priority is to preserve a usable backup before attempting repairs.

The message you might see

Table 'wp_options' is marked as crashed and should be repaired

Different wording, or a file path in the message? Paste it into our free error finder to see which plugin or theme it comes from.

What a crashed WordPress database table means

WordPress stores site settings and other application data in database tables. The table commonly shown as wp_options stores WordPress options, although your site may use a different table prefix and therefore a different name.

A "marked as crashed" message usually comes from the database layer rather than WordPress itself. It has historically been associated with MyISAM tables. Modern WordPress installations commonly use InnoDB, and MySQL's REPAIR TABLE statement does not repair InnoDB tables, so the storage engine matters before you choose a repair method.

Symptoms can include a blank or broken front end, wp-admin failing to load, missing settings, or database errors appearing only on pages that query the damaged table.

Common causes of a table being marked as crashed

Table corruption can follow an interrupted database write, an abrupt server or database shutdown, storage problems, a full disk, or failure in an older MyISAM table. Repeated corruption should be treated as a hosting or database reliability issue, not something to solve indefinitely with repeated repairs.

  • An unclean database shutdown. A server crash or forced restart can leave table data or indexes inconsistent.
  • Storage or filesystem problems. Disk errors and lack of free space can interfere with database writes.
  • A legacy MyISAM table fails. MyISAM has repair tools that differ from InnoDB recovery.
  • A failed migration or restore leaves inconsistent data. The database may need to be restored from a known-good backup rather than repaired in place.

If several tables show errors at once, or corruption returns soon after a repair, check the database service and underlying hosting environment before making more WordPress changes.

How to repair a crashed WordPress table safely

Before editing wp-config.php, running a repair or changing the database, take a full backup of both files and database. If a normal database export fails, preserve the latest known-good backup and ask the host what snapshot or database-level recovery options are available.

  1. Confirm the exact table and storage engine. In phpMyAdmin or your database administration tool, check whether the affected table is MyISAM or InnoDB and confirm the site's actual table prefix.
  2. Try WordPress's built-in repair mode. Add the following line to wp-config.php, above the line that tells you to stop editing:
define( 'WP_ALLOW_REPAIR', true );

Then open /wp-admin/maint/repair.php and run the repair. Remove the WP_ALLOW_REPAIR line as soon as you finish. WordPress deliberately allows that repair page to work without login while the setting is enabled, so it should not be left active.

  1. If WordPress cannot repair a MyISAM table, use the database tool carefully. MySQL supports REPAIR TABLE for MyISAM, ARCHIVE and CSV tables. In phpMyAdmin, select only the affected supported table and use its repair operation, or let an experienced administrator run the equivalent SQL.
  2. Do not run REPAIR TABLE as an InnoDB fix. If the affected table is InnoDB, or if the repair reports lost rows or repeated corruption, stop and use the host's database recovery process or restore a known-good backup.

After recovery, check the site front end and wp-admin, save a fresh backup, and investigate why the table became corrupted.

When to stop repairing and restore or get help

Stop if the repair reports that rows changed unexpectedly, several tables are damaged, the database repeatedly crashes, or you cannot confirm the storage engine. The wp_options table can contain settings that affect the whole site, so an apparently successful repair that discards rows may still leave WordPress misconfigured.

Do not delete wp-config.php, replace WordPress core files or empty the damaged table. If the database is business-critical, a controlled restore from a known-good backup may be safer than repeated repair attempts.

Our Emergency Fix is £249 per incident with a response within 2 working hours. Care plans start from £59 a month for ongoing maintenance and support.

Common questions

Answers to the questions we hear most about this.

What does "table is marked as crashed and should be repaired" mean in WordPress?

It means the database engine has detected corruption or inconsistency in a table WordPress is trying to use. The message comes from the database layer, so the correct repair depends on the affected table and its storage engine.

Can WordPress repair the wp_options table itself?

WordPress includes a database repair mode enabled temporarily with WP_ALLOW_REPAIR in wp-config.php. Take a full files and database backup first, remove the setting immediately after use, and do not assume it can repair every storage-engine problem.

Should I run REPAIR TABLE on an InnoDB WordPress table?

No. MySQL documents REPAIR TABLE for MyISAM, ARCHIVE and CSV tables, not InnoDB. If the damaged WordPress table is InnoDB, use the hosting provider's database recovery route or restore a known-good backup rather than forcing a MyISAM repair method.

Site down or showing an error?

Call us now. Emergency Fix is £149 with a response within 2 working hours, and no fix means no fee.

Get website support