Table ‘./DB_NAME/wp_posts’ is marked as crashed and should be repaired

This tutorial guides you how to resolve MySQL error Table ‘./DB_NAME/wp_posts’ is marked as crashed and should be repaired.

Issue: Table is marked as crashed and should be repaired

Are you facing wordpress “No posts found!” issue ? And when you login to phpMyAdmin via cpanel are you seeing the below error and message which says wp_posts is “in use” ?

#141 - Table './DB_NAME/wp_posts' is marked as crashed and should be repaired

Solution

To fix the above issue, first login to cPanel and click phpMyAdmin as shown below.

phpmyadmin table marked crashed repaired

Once you see phyMyAdmin dashboard, then choose the database of your wordpress website, which should list all the tables of that database and you might notice error message saying that “Table ‘./DB_NAME/wp_posts’ is marked as crashed and should be repaired

Therefore, you need to repair the table to fix wordpress “No posts found” issue. To fix, select the table by choosing checkbox, then you need to select the “Repair table” option under “Table Maintenance” section in the dropdown (With Selected dropdown) below the list of tables as shown below.

table marked crashed to be repaired

Once you select “Repair table” option, it will start executing the following SQL query and will repair the table.

> Press Ctrl+Enter to execute query
> REPAIR TABLE `wp_posts`

Your SQL query has been executed successfully.

Table         Op        Msg_type       Msg_text
wp_posts      repair    status         OK

Finally, login as WordPress Admin, go to dashboard -> All Posts. Now you should be able to see all the posts and the error “Table ‘./DB_NAME/wp_posts’ is marked as crashed and should be repaired” in the phpMyADmin should have disappeared. Hope this helped 🙂

Also See:

References:

guest
0 Comments
Inline Feedbacks
View all comments