• peter1234

    (@peter1234)


    Hello, our WordPress blog has been working fine for about 6 months now. Then last night a blogger posted a new post and it took down the whole site with about 30 separate WordPress blogs on it. I couldn’t log in to the server and had to restart it, then all the blogs came back up except the one that submitted the last post that took everything down. Now when we go to that blog the page says “Not Found
    Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.”

    In the “Super Admin” tab under “Sites” it says “Post Count = 1700,” but on the “Dashboard” for that site it says 0 Posts but 1500 comments. It looks like all the posts are gone. It says it is using 14MB of storage space, do you think the posts are still there and just got corrupted or unlinked or something? What do you think happened? How do I get the posts back? Thank you.

Viewing 14 replies - 1 through 14 (of 14 total)
  • kenrik

    (@kenrik)

    Don’t you have a backup of the site?
    You should be running at least weekly backups if not daily.

    Thread Starter peter1234

    (@peter1234)

    No backups. I just started working here and they have absolutely no backups of anything.

    So does it sound like the posts are gone for good? The comments are still there, just the posts aren’t. And the blogger said he thinks the 14MB storage sounds about like what he was using before his posts went missing so it kind of sounds like the posts could be there. I’m not sure how WordPress works behind the scenes, but maybe just the database pointer got unlinked.

    I went looking in the database to see if I could find the content but WordPress has over 400 tables in the database so it’s like finding a needle in a haystack.

    Should I have him post a new dummy post to see what happens? I didn’t know if that would wipe out the posts for certain.

    kenrik

    (@kenrik)

    Did you look in the database?
    I don’t know if you’re using PC or Mac but on the Mac I use Sequel Pro (Free) or you can user PHPMyAdmin or one of the WordPress Database Plugins.

    Anyway.. look in the mysql database for that site and see if the posts are in there.

    kenrik

    (@kenrik)

    Ok.. I just read the part about the “400 tables”

    You need to find the site ID for that site. Then you need to find the tables in the database that belong to that site. Once you find them it should be easy to track down the post table for that site.

    Thread Starter peter1234

    (@peter1234)

    Thank you so much kenrik, I think we’re on to something. Not sure if it’s fixable but it’s worth a shot.

    Okay I am using MySQL command line. I found the ID of this blog to be ID 23 and I just ran this command to show the table structure:
    desc wp_23_posts;
    and it gave me this:
    ERROR 145 (HY000): Table ‘./myblogs/wp_23_posts’ is marked as crashed and should be repaired

    I ran a desc to see the table structure on all the other tables with 23 as the ID and they don’t give that message. Only the wp_23_posts table crashed. Any ideas now?

    kenrik

    (@kenrik)

    Yup. There is a plugin called “WP-DBManager” that can repair the database.

    Try it out.. but make a backup of the database first (also in the same plugin)

    And if you have phpmyadmin on the server, you can also repair the table from there.

    But dude, BACKUP FIRST.

    Thread Starter peter1234

    (@peter1234)

    Thanks both of you. I tried doing a phpmyadmin backup but export.php is missing, just my luck. Then I did a backup straight from the server running Plesk Control Panel and it failed once it got to the corrupt table, not sure if it skipped that table and backed up the rest, I’m trying to download the backup and verify. Anyway, I’m going to try and get this resolved tomorrow when my eyes aren’t fuzzy.

    and make sure your host knows of the issue with phpmyadmin.

    Thread Starter peter1234

    (@peter1234)

    Well I tried so many different ways to make a backup and each way kept failing because that ONE table was corrupt. I even did a mysql dump of the whole DB and the backup came up blank because I guess it pre-scans all the tables and saw a corrupt one.

    After all that I ended up installing and using the WP-DB-Backup plugin. It let me choose which tables to backup, and I selected all of them but the wp_23_posts table. So I have a backup of at least everything except the corrupt table. I tried making a separate backup of just that corrupt table to triple check and it failed too. I’m going to try repairing it now, I think that one table is going to be history, better that than the other 400 tables.

    kenrik

    (@kenrik)

    Let us know how it works out.

    Thread Starter peter1234

    (@peter1234)

    Thank you both SOO much!!!

    The WP-DBManager plugin’s backup part ended up failing because of the corrupted table, but I used the WP-DB-Backup plugin which allowed me to skip that table and back up the rest.

    Then for repairing the database, the WP-DBManager wanted to repair all the tables by default so instead of manually unchecking repair on the 400 working tables I just used phpmyadmin which was easier. And presto! The whole blog was working again. Then once the table was repaired, I IMMEDIATELY backed it up and breathed a sigh of relief.

    Here is the message the repair sent me:
    myblogs.wp_23_posts repair info Found block that points outside data file at 61495…
    myblogs.wp_23_posts repair info Found block that points outside data file at 61521…
    myblogs.wp_23_posts repair warning Number of rows changed from 2158 to 2157
    myblogs.wp_23_posts repair status OK

    So what do you think happened? Does it look like it went over a size limit? I forget what the table limits are but isn’t there a common cap on 65k or something? It looks like it was about at that magic number. I also noticed the number of rows went down by 1 so I’m sure the last post was deleted but that’s fine.

    Again, thank you both so much.

    I would turn off revisions if you don;t need them. they fill up the db really fast.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    The easiest way to do that is put this in your wp-config.php file:

    /** Turn off Post Revisions without a plugin **/
    define('WP_POST_REVISIONS', false);

    I put mine right ABOVE the section for MultiSite.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Urgent Help – Whole blog wiped out’ is closed to new replies.