WordPress.org

Ready to get started?Download WordPress

Forums

WordPress database error (6 posts)

  1. SeanMcConeghy
    Member
    Posted 5 years ago #

    I haven't made any changes outside of updates to my blog for a while, but I've had a new problem the last couple of days. At the top of all my admin pages, I get the following:

    WordPress database error: [Table './republi2_wrdp1/wp_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT COUNT(*) FROM wp_comments WHERE comment_approved = '0'

    WordPress database error: [Table './republi2_wrdp1/wp_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT COUNT(comment_ID) FROM wp_comments WHERE comment_approved = 'spam'

    On my dashboard, I get this where the comments are supposed to be in the righthand sidebar:

    WordPress database error: [Table './republi2_wrdp1/wp_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM wp_comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 5

    WordPress database error: [Table './republi2_wrdp1/wp_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT COUNT(*) FROM wp_comments WHERE comment_approved = '0'

    And instead of my blogstats section, I get this:

    WordPress database error: [Table './republi2_wrdp1/wp_comments' is marked as crashed and last (automatic?) repair failed]
    SELECT COUNT(*) FROM wp_comments WHERE comment_approved = '1'

    There are currently 760 posts and comments, contained within 119 categories.

    I know nothing about coding and am hosted by Bluehost. Can anyone tell me how to resolve these issues?

  2. kulpreetsingh
    Member
    Posted 5 years ago #

    Do you have some sort of comments plugin or widget?

    Perhaps try to disable it and then refresh and check.

  3. SeanMcConeghy
    Member
    Posted 5 years ago #

    I have the standard WordPress comment set up, nothing fancy.

  4. Jon W
    Member
    Posted 5 years ago #

    Was this resolved? I am new to WordPress, so keen to know if this sort of problem is common.

  5. mishko
    Member
    Posted 5 years ago #

    I recently had this error show up on my WP 2.2 blog.

    To fix it:
    I tried upgrading Akismet to the latest (always good to do anyway)... that didn't do it.

    then I logged into Mysql PHPMyAdmin and did a repair table on the wp_comments table. (ie. check box related to wp_comments and choose repair table from drop down menu.) When I refreshed the dashboard, the error message was gone.
    YAY!

    HTH

    ps. this was the first time i've ever came across this error. I've been using wordpress for about 2 years at this point, with many installs under my belt.

  6. BernardBorealis
    Member
    Posted 5 years ago #

    This is definitely an error related to a corrupt database table. As mishko properly suggested, open up phpmyadmin, select your table, or check all tables, and, with selected, click repair.

    When you are done with that, backup your database and store it somewhere safe. If, for some reason, a table gets corrupt beyond repairing, it is nice to have a database backup you can restore from.

Topic Closed

This topic has been closed to new replies.

About this Topic