Using Google Cache to Recover Blog Pages

Posted by jtpratt |09 Feb 08 | 7 comments

Ever wished you could get back a previous version of a web page? You can – quickly using google cache!

I was hacking my WordPress comments.php file the other day and changes that I made didn’t work. When I decided to back them out I realized I made too many to remove by hand – so I used a version I had on my local PC. I thought it was the latest version. It turns out that the last time that I made changes I did it in through the theme editor in WordPress, so my local version was really old.

Last Month I wrote about creating Rockstar Comments in WordPress in 12 Steps. When I wrote that article I modified my comments.php file and placed a new block at the top of the Comment form showing readers that we reward comments. Now those changes are gone!

I backup my site and I could dig up my previous version from a backup – but there’s an easier (and quicker) way. This has worked for me before when I made a change and needed to get back the previous version within a week. With this method you can “restore a blog page” yourself!

First you need the full URL of your page. Then paste it in google. When the search result comes up just click on “cached” (which I have highlighted in red below):

google cached version example

When I clicked on it the google cache says that the page it’s showing me is from February 4th (and today is the 9th). Perfect!

google cached page top example

When I scoll down the page I find the block of text that I need to recover. I take my mouse and highlight it, and then right-click the mouse and choose “view selection source” (you can only do this in Firefox).

view selection source

Once you do that just what you highlighted will he highlighted in the html code for you like this:

highlighted source code

I copied the div I had lost and pasted it back into my comments.php (on my local PC of course) and then made the changes in WordPress. I have successfully recovered my page using google cache! This method also works if you somehow delete a page and don’t have it at all – google cache to the rescue! It’s not nearly as specific, but if you want to go back in time months or years You can always check out the Wayback machine at the Internet Archive! My blogging mistake this time was not keeping a local backup copy of all my WordPress theme files! Editing them in WordPress using the theme editor is handy, but overwrites the previous copy every time.

Have a story about losing a page, post or content? Have a question? Please, comment now!


7 Responses

  • spostareduro/ 10 Feb 08 @ 10:42 AM

    Thanks for the tip! Glad I stopped by to drop kick your EC

    spostareduro’s last blog post..Shari Voigt’s ?Strange but True?

  • Stephan Miller/ 12 Feb 08 @ 1:56 PM

    I’ve had to use that trick more than once. Once I used it to find out how to unlock a GM car stereo. There is a phone call you have to make to do it. Then all you do is type in some numbers and it gives you a code. The dealership charges for this. I found a forum post through Google, but GM got to the site first and took the post down. Using ye olde Google cache, I saved myself what was $30 at the time. I don’t mind spending money, but paying someone to make a five minute phone call, too much.

    Stephan Miller’s last blog post..Blog Monetization Strategies

  • kometbomb/ 12 Mar 08 @ 12:41 PM

    I find the Wayback Machine bookmarklet very useful (link below, scroll down a bit). You could also create a similar bookmarklet for a suitable Google search.

    http://www.archive.org/web/web.php

    kometbomb’s last blog post..Software Improvements That Made Hardware Better

  • Snam/ 13 Dec 08 @ 11:41 PM

    I need some help! I lost all my widget settings when I tried to change templates. I have the most recent cached page from google but I do not know how to use it to restore my blog. I tried viewing the source and copying and pasting it but I get errors from blogger.
    This is my original site: http://howtoearnmoneyonline-snam.blogspot.com/
    This is the archived version that I WANT back: http://209.85.173.132/search?q=cache:4keDRz61ITwJ:howtoearnmoneyonline-snam.blogspot.com/+http://howtoearnmoneyonline-snam.blogspot.com/&hl=en&ct=clnk&cd=1&client=firefox-a

    Please help me ASAP! I will be online so please post a comment or email me or something!

    Snams last blog post..Payment Proof – Neobux

  • Sam Small/ 15 May 09 @ 5:42 PM

    my wordpress folder got deleted by accident. My host, Godaddy, had me build a new mysql file and they restored the old database into that new file. I did the restore of the wordpress folder so my uploaded files are present, but when I reconfigured the wp-config.php to the new identity so they see each other the blog comes back essentially empty, none of my old posts, pages, comments etc. are present.

    I see that none of my widgets are in place, it’s as if the theme was reset to default. Also, all my plug ins are in the plug ins folder but none are activated nor applied.Wouldn’t my customized theme have come back with the restore of the WordPress folder? Or is there some pointer to the mysql that WP is not seeing right? The new mysql has a different user name and database name than the old, but I updated wp-config.php to see the new mysql.

    Is there some other file that needs to be updated with those new names so the theme i customized comes back?

    Google has them cached for now, can I get the code from Google and plug the pages back in somehow? If so how?

    Thanks in advance.
    Sam

  • admin/ 16 May 09 @ 3:09 PM

    you can get the text from google cache, but not the code…

  • Sam Small/ 16 May 09 @ 3:41 PM

    Hi Thanks for the response. Actually Google saved my ass on this. I was able to do a site: search for my site and calling up the google cached versions of my pages I was able to copy out relevant portions of the code, the parts that went into the wordpress pages, not the wordpress code and using that was quickly able to replicate my entire site in a few hours.
    Thanks for the tip.

You must be logged in to post a comment.