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):
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!
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).
Once you do that just what you highlighted will he highlighted in the html code for you like this:
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!
You must be logged in to post a comment.