How to Recover Your Deleted Blog

Thanks to bad directions from the worst hosting company ever, plus my own carelessness, I deleted The Cookblog’s MySQL database yesterday. After exporting the database, deleting it, and recreating it, my attempts to import all of the tables back in met with failure due to an error. Further study showed that the export contained an error, so my copy was essentially useless. After a few choice words, I had no choice but to set about retrieving my lost posts (naturally, I hadn’t backed them up). I’m sure this has happened and will happen to others, so here’s how I went about recovering my posts with the help of Google and WordPress.

1. First, you’ll want to find the copies of your pages that Google knows about. To do this, simply do a Google search for “site:yoursitename.com”

Google Site Search

2. For each post, get Google’s copy by clicking the “Cached” link below the search result. It’s helpful to have a browser that supports tabs for this, since there will probably be a lot of these pages to open, especially if you have a lot of posts.

Google SERP

3. Clicking the “Cached” link will take you to a page that states the date Google last saved it. It may or may not include images. Since Google won’t keep these copies around forever, it’s best to go through this process as soon as possible.

Google Cached Page

4. If you want to save the images for some reason (I still had my files intact in my FTP and they were backed up anyway), you can right-click and “Save As” to capture them. Otherwise, you’ll want to view the source code of the page. If you use WordPress, you should be able to find the title of your post, the date it was posted and the content of the post. Select the code starting with the title and ending with the close paragraph tag. Copy it and paste it into a TXT file. Repeat steps 2, 3 and 4 for each post.

Source code

5. Once you have all of the posts you can get off Google in the TXT file, open up the WordPress’s Write Post interface. Copy and paste in the title of the post, then switch the input field from “Visual” to “Code”. Paste in the code of your post, starting with the paragraph tag that opens the post and ending with the end paragraph tag that closes the post. This will keep your links and images intact without having to re-enter them.

WP Code Field

6. Between the title and post content in the source code is the date that you actually published the post. You can use WordPress’s Post Timestamp option to publish the post with the initial date.

WP Timestamp

As long as Google has seen your pages and made its own copy, you should be able to recover almost all of your lost content. It only took me about an hour to retrieve and republish the 50 or so posts I’d made over the past few months. It also persuaded me to use the Manage–>Export function to save a copy of my entire blog so that if I ever delete it again, I’ll be able to reinstall WordPress, import my saved file, and revert immediately to its previously saved state. That’s a far easier and more complete way to recover a blog, but the above method is better than nothing. Anyone else have tips/horror stories?

23 thoughts on “How to Recover Your Deleted Blog”

  1. Wow, that sucks. Glad you got everything back though. I’ve heard another horror story like this, and they went back to putting it back together just about this same way. Good lesson for the kids: Backup your databases!

    [Reply]

  2. Another way which i found cause i just encountered that.. TWICE in past two months.. i had subscribed to my blog through google reader and manage to have all my posts.. just that the comments are gone :( sniff

    [Reply]

  3. wow thanks a lot, I used your information to recover most of my blog. I think once I got to step 2 & saw my blog, I was super excited, and just copied everything, and didnt finish reading hee, luckily, most of it came true in the Rich text editor.

    bloglines also helped, it had 10 days postings, and I could email it, n the entirety, post, pictures, etc to any email.

    Thanks again!!

    [Reply]

  4. @ Ambrosiality – I’m glad it helped you!

    @ Anita – If you used your robots.txt to disallow Googlebot, you might try Yahoo. Also, your homepage might be stored on http://www.archive.org, although those are usually infrequent and incomplete snapshots of just the home pages of sites.

    [Reply]

  5. i realise that my blog has been removed when my sister tried to visit it and received a message from blogger that the blog has been removed. when i log in, i could see this particular blog from my dashboard. what do i do? i’ve gone to google forum and help but none seem to be able to help me.
    I need help.

    [Reply]

  6. Hey! This has been helpful for me. I just figured out this past week that my blog was deleted for some reason & google could care less. So Ive been typing in post titles that I can remember…but I have had my blog for 2 years (since my baby was born) & I just cant remember everything. I still cant find every post…… any thoughts???

    [Reply]

  7. Thanks so much for the help. I managed to get all my blog entries back, and I deleted my blog a week ago, so I had no hope, I was so excited when I read through this and it worked! Thank you!!!

    [Reply]

  8. My friend’s account on a blog sight got hacked. Everything was lost and i want to try and help recover it if possible. I didn’t create the site, melodramatic.com (its similar to myspace or facebook) and was wondering if these steps could retrieve the lost data. It appeared to me that this was just how you recovered data from your own sight that got deleated. I’m only miledly computer savve, so i’d greatly apprieciate the help.

    [Reply]

  9. Someone hacked into my Blog account and deleted all 100+ of my posts. Is there any way of retrieving those if my account was private? I did these steps and it is not bring it up :(

    [Reply]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>