Resolving WordPress Errors: Table is marked as crashed

This relates to the solution to the previous WordPress database problem. But the specifics there is a problem in the corrupt WP database table.

Initially, I guess from the standard error message “Error Establishing Database Connection” It was overcome quite simply. Just a problem between MySQL username/password or database name is wrong. Apparently that happens is one or more tables that are in a corrupted WordPress database and need to be repaired.

Resolving WordPress Errors: Table is marked as crashed
Resolving WordPress Errors: Table is marked as crashed

The solution is easy. Please edit the wp-config.php file and add the following code:

define(‘WP_ALLOW_REPAIR’, true);
/* That’s all, stop editing! Happy blogging. */

Then open the link nama_domain. com/wp-admin/maint/repair. PHP and just press the Repair Database button. If it works then the solution is up there.

But if still problematic and a message appears like this:

The wp_options table is not okay. It is reporting the following error: Table is marked as crashed and last repair failed. WordPress will attempt to repair this table…
Failed to repair the wp_options table. Error: Table is marked as crashed and last repair failed

So to fix it we have to manually can pass SSH to its server database (MySQL/MariaDB is the same), or if it is in shared hosting using phpMyAdmin. All we need is the ability to execute SQL queries.

Please note the name of the table that is mentioned in your WordPress error, in my case and as an example is the Wp_options table. So the SQL command:

repair table wp_options;

Okay enough that’s all and hopefully useful.

Tags: