• My wonderful web host bombed the mySQL database on my installation. Most everything is back, but wp_comments is still corrupt. When trying to do anything, I get:

    WordPress database error: [Table ‘.\dbname\wp_comments’ is marked as crashed and should be repaired]
    SELECT * FROM wp_comments WHERE comment_ID = ‘13484’ LIMIT 1

    This db problem with the host already lost a year’s worth of comments, so they’re gone anyway. I’d like to just delete the wp_comments table from the db then recreate it, without having to reinstall the whole site and lost a years’s worth of articles.

    I am very nervous about making any change that will come back to haunt me, meaning in the past I’ve made little php tweaks then the whole theme gets screwed up.

    Can anyone give a simple and quick, reliable way to delete the wp_comments table, then recreate it?

    Thanks!!

Viewing 8 replies - 1 through 8 (of 8 total)
  • since you indicated when you started writing this post that you are using 2.2.x can you confirm what version of WP you are currently using? It makes a big difference.

    Thread Starter oftenbrokebroken

    (@oftenbrokebroken)

    Thanks for your help—-I just see 2.2:

    Version 2.2
    Semantic Personal Publishing Platform

    Is there somewhere else I should look for a more detailed version number? Thank you so much!

    nope that works

    can I assume you have phpmyadmin access?

    Thread Starter oftenbrokebroken

    (@oftenbrokebroken)

    Well yes, I have myPHPAdmin and can “drop” a table. I don’t have full access though (DB with hosting company).

    If I drop it, main question is, can I fairly easily recreate the wp_comments table.

    Thank you again!

    Once you are in phpmyadmin, just click through on the SQL link at the top, and paste this:

    DROP TABLE 'wp_comments'

    The wp_ is the prefix that you used in your wp-config.php, if you chose another prefix you will need to adjust that.

    THAT will drop that table.

    To recreate it :

    (Im going to link to a file, the pasting here sucks for this), go here:

    http://wordpress.pastebin.ca/871438

    One thing to take note of is the charset, that might not match yours. You may need to change that to match what you are currently using.

    Thread Starter oftenbrokebroken

    (@oftenbrokebroken)

    Whooami—thank you so much for helping me out. What a nightmare this has been. I think this will work. Thank you!!!

    I was having roughly the same problem (wp_comments was corrupted or lost somehow), and I upgraded and moved to a new host.

    In the process, I rebuilt my wp_comments file following whooami’s tip.

    Now it’s possible to make comments on my blog, BUT the comments do not show up in my dashboard.

    Any help? I’m running WP 2.6 now, having recently upgraded from 2.0-ish.

    Scratch that. wp_comments rebuild was a red herring. This was just the same problem lots of people were having after upgrading, discussed here: http://wordpress.org/support/topic/167450?replies=6.

    Thanks though for the tips on the wp_comments rebuild. Worked perfectly.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Removing and Reinstalling wp_comments’ is closed to new replies.