Did You Just Accidentally Delete That WordPress Page or Post?
I did, and I wanted to share with you a quick and easy way to get it back.
So there I was pruning some pages that had been created as holder pages - and while quickly going the motions: delete, delete, delete…I saw to my utter disbelief and despair that I had deleted one of the main pages to the site inadvertently.
After searching around on Google for a bit, I discovered a WordPress forum post that was so simple (and genius) it worked. If you’ve dealt with this before, you might have thought it up yourself, but since I hadn’t it was a nice Ah-Ha moment. Here’s what the poster suggested.
- Go to Google
- Enter the exact destination of the now deleted page: mysite.com/page-i-just-deleted-because-im-a-moron/
- Hit the cache button
- Copy the content from the Google cache and you’re good to go.
I’ll even take it a step further and remind you to copy the source code for the main content pane – as opposed to simply taking your mouse and highlighting the text on the page (by doing it that way you lose images and other various formatting that the html code will keep in place).
So after about a minute, I had found the cache of the page, copied the source, gone back to WordPress and pasted the code, double checked that everything was in tact like before (which surprisingly it was 99% perfect – just one line needed to be centered again), and that was that – a quick and easy solution if you ever accidentally delete a page or post from WordPress.
Now, if it’s a relatively new post or site and the search engines haven’t had a chance to index it yet, most likely your host can help. Places like Hostgator (where this site is hosted, and whom I recommend 110%), Site5 (another one of my favorite hosts), and most all the major hosting companies take daily, weekly, or monthly backups to your site so if worst comes to worst, you can contact them in a last resort to get your missing content back. In case this has happened to you, I hope this will make getting your content back a little easier.
Oh yea, now go make money online!
Ok good to know.
Is there any way to recover an archive of a page that was indexed by google 6 hours ago but has been removed?
Does Google pick up instant new articles or pages? or is it from previous cached ones.
-Mike
First of all that is really a great idea, that I had never thought of!
@Mike, If you’re website is old enough or popular enough, from my experience Google will have your article indexed within 15 minutes of making the new post, and will often have the cache on the same day. I don’t know the time line on the cache though since I haven’t paid too much attention to it, but I would assume that it is there too, since I have seen the index in less than 15 minutes. I hope that helps!
Wow. That’s actually really brilliant. Bookmarked.
Clevert rick, you just gotta catch it before the googlebots have trawled your blog again. On busy blogs this is a frequent occurrence, so better be quick about it!
I recently had to do this for a site of mine that I thought I had lost. I was searching everywhere for a cached version. Unfortunately the site was so new that I could not find it anywhere. Luckily in the end I was able to restore everything by fixing something in the backend.
where is the cache button?
@writing – it’s right next to the URL in the search result (if the page has been there long enough to be cached). For an example, go to Google and type in Blogging Experiment, locate the URL of the site, and you’ll notice the “Cached” link right next to it. This is the most recent scan Google has on record that they’re showing to the seprs.
I had no idea web hosts would take automatic backups for websites without you asking for it. That is a great idea to ask them for help — worst case scenario they say no. I’m going to email my host and see if they provide it free of charge and regularly scheduled. I assume the ones listed above Hostgator and Site5 do auto backing up at no extra charge and without having to ask for it?
Remote Office I’d be surprised if many web hosts actually offered this service for free. I’m sure a lot of web hosts try to charge for this as an extra service. When hosting a lot of websites it would be a lot of work to keep backing them all up.
It’s really good idea for getting content back. Thanks for information. I will remember this trick. Thanks.
I’ve actually accidentally deleted my blog post before, I’ve no idea how to get it back, so I re-write it again, that was a bad experience for me and I’m trying not to repeat it again. Anyway, I learned something new today here.
Thanks Kyle!
-Davis-
nice information you are sharing , rather i should say a nice trick to erase your mistake, good job
There is also a wordpress plugin called “wp-db-backup”, it will send you backup copies of your database via email. Very useful just in case there is no Google cache to rely on.
Till then,
Jean
You said, “…gone back to WordPress and pasted the code…”
Question: Pasted the code where?
I accidentally deleted my Home page (it was a page called ‘home’) and I found it cached on Google, but where do I paste all this?
Doug, you simply take the content of your site (basically what’s in the body of the site) and recreate a HOME page then paste that. You’re not copying everything from the cache. Your header/footer should be when you create page again, so you just need to get the content. Does that make sense?
Hi Kyle. Thanks for the quick reply. What I ended up doing was calling my host (HostGator) and the tech person walked me through applying for a site backup. They keep regular site backups on every Sunday. I got the site restored about twenty minutes ago thanks to their wonderful support team. Now I just have to go through and update everything I have done since Sunday (aiye).
Lesson for today – make regular backups of my site.
That’s a lesson I’ve learned the hard way as well. I’m glad they were able to get most of your content back. I like your site by the way…very nice presentation and design!
I like your blog theme. What template did you use ?
It is a custom theme I had created. I’m glad you like it.
Okay, I’ve only done that five or six times myself! Good to know, sir!
This trick works only if the page was cached in google. You can try also the yahoo and bing cache in case you deleted a post and now you want it back. Or check your older backups
Okay, i see the after, but is there a reason why I lost my post and pages in the first place.
Wow! You just saved three of my blogs. Thank you. This is genius.
Doug, you simply take the content of your site (basically what’s in the body of the site) and recreate a HOME page then pastethat.Thank you. This is genius.