How to Fix a Sudden Disappearance of all WordPress Posts

Everything's empty

It’s your biggest nightmare; you go to your WordPress site, and there’s no content there. Did the blog goblin come and munch it all up? You log in to your dashboard, but all of the posts are all listed, like nothing happened. What sort of voodoo trickery is this!?

Well, in the few instances that I’ve dealt with this, it’s always been a single culprit and it’s actually very easy to fix. Assuming that nothing else is to blame (like a recently installed plugin, or some theme editing gone wrong), here’s where I’d start.

Check your database

Log into your web host. If you’ve got a good web host (like HostGator), you’ll be working with cPanel. Scroll down to the databases section and click on phpMyAdmin, which is the application for managing your SQL databases. Then open up your WordPress database and click on the Structure tab to review all of the tables in your database.

Scroll down to your wp_posts and wp_comments tables and look to see whether they say In Use where the Type and Collation columns are. If they do, check the box(es) at the beginning of the row and at the bottom of the table, choose Repair from the drop-down menu. You should get a little confirmation that the tables have been repaired.

Now head back to your site and reload it. Is everything back to normal? If not, I invite you to explain your circumstances below so that other users who have the same problem can find a solution.

5 thoughts on “How to Fix a Sudden Disappearance of all WordPress Posts”

  1. Mario says:

    This has happened before and all I did was disable the last plugin installed, then deleting it and just going into permalinks and hitting update button that usually does the trick even before you go into the db this is worth a shot. :)

    1. That’s another good idea. Saving permalinks is often the solution for a whole host of simple WordPress problems.

  2. Dave Walker says:

    Thank you Mario and Dave. Exactly what I needed! I suddenly had all my posts disappear when I updated a single post and the site was ‘hanging’ on the post update. I guess it got one of the tables stuck in ‘in use’. Saving the permalinks did the trick though :-)

  3. I assume, when the whole table wp_posts is not there anymore, we cannot get the content back, right?

    Interestingly: The number of tables showed on the left in the overview doesnt match with the actual number of tables…

    Any ideas? :-(

    1. That’s right. If wp_posts is gone, and you don’t have a backup, then I’m afraid it’s gone. Keeping backups is essential (to avoid catastrophes like this). I have a clue why the tables in the left pane don’t match up with those in your actual database – they should match exactly.

Leave a Reply