While editing a WordPress post the other day I clicked on Add Media before I had saved or published the draft.
When I tried to upload the image I received the error WP couldn’t write to the disc. Odd. I then returned to editing and went to save a draft before I investigated what was going. Then I got the error that I was unable to save the past as the post did not exist. I returned to the the Dashboard and there were no posts or pages, only a few categories and comments.
I tried to look at the site’s home page but it returned the error the no content could be found in that category. All my posts were gone and no media was listed in the media library when I logged in again. The admin section worked fine, the page template displayed but there was no content for the pages.
The problem was a corrupt database. To solve the problem of WordPress content that has disappeared just run Repair on your tables using PHPMyAdmin and your site will come back to life.