Last week I ruined part of my blog and had to restore it from backup. The way I caused this problem was that first I installed a plugin that would control the placement of Adsense ads throughout my blog. When I tried to configure it, I kept getting a message that a .php file was not found. So I deactivated that plugin and installed a different Adsense plugin. I used it to put ads in several posts, and I kept looking at the single posts as I’d go along, admiring my work, but I never did look at the main page. Finally when I was ready to finish up and give the computer over to my youngest son for his Facebook time, I went to www.miscbytes.com and was horrified! The footer was now in the right sidebar, the right sidebar content was in the left sidebar, and the left sidebar content was in the footer. Well, I assumed I must have overwritten a file in my theme with those plugins, so I changed themes. That made no difference. Hmm.. well the single post page looked OK, and the About page looked OK..it was just the main page that had changed. I went to another domain where I had a clean WordPress install and tried to compare the contents of the various files. They all looked the same to my inexperienced eye anyway. I’ve only had this blog for a month or so, but I have put in enough hours that I definitely wanted it fixed.
A nice fellow on a forum suggested that my database was probably the problem and would have to be restored. Ahhh…fortunately just about a month ago I had read about Hunter Nuttall’s blog disaster recovery and had downloaded the WP-DBManager plugin and set it up to back up my database every two days and email it to me. I had previously backed up the whole site regularly from my BlueHost cPanel, but this plugin is an easy “set it and forget it” way to set up your database backup from within WordPress. Since the backups are emailed, you can save them in Gmail for quite a while before you’d have to start deleting the old ones. So anyway, I looked into my email and sure enough there was a backup from just hours before my plugin fiasco.
Just for safety’s sake, in case my backup was bad or the restore went terribly wrong, I took a backup of my current database and WordPress files and set them aside. I don’t know if a fresh installation of WordPress was necessary, but I did one in case the problem was WordPress files that had been overwritten, and I associated the new installation with my current database. Finally I went into cPanel and Backups and Restore a MySQL Database. My file in Gmail, from the plugin, had extra characters in the name compared to the name of the file produced by backing up in cPanel, so I renamed my file from plugin/Gmail so it matched what cPanel was expecting, then uploaded it and restored my database. I was almost afraid to look, but the blog looked exactly as it had before any of the trouble had happened. I had received one comment while the blog was sideways, and unfortunately I lost the comment, but otherwise MiscBytes was as good as new.
I’d always thought I was backing up in case there was a disaster or server problem at my hosting company, but it turns out I caused my own disaster. So how often to back up? Well, how many days of work could you stand to lose? If you just post on MWF, then I guess you could back up immediately afterward, three times/week. Or you could back up every day. Gmail offers loads of storage, after all. I’m still going to back up every two days, but I’ll make doubly sure to run a quick backup before installing any more plugins!
{ 5 comments }
Thanks for sharing the story. Fact is, we normally don’t notice the importance of ‘backup’ until the day we desperately need it. It should be done as soon, and frequent as possible. Will need to think of how to carry out a proper backup for my work too. Thanks Miscbytes. Great reminder!
Ching Ya’s last blog post..8 Features You Should Know About Su.pr
Thanks for the reminder. I try to back up 1x per month, and I’m due for another. Yahoo is my host–they make it fairly simple. I’ve had to rely on back up one time when I lost my entire site by deleting the wrong theme in my ftp client server. So thanks again for the reminder.
Cheers!
AV
@Ching Ya: It’s true, we often really don’t think about backup until we need it, and sometimes we’ve been doing something we *think* is enough, but if it doesn’t restore your site, it isn’t enough!
@A Vecchioni: Yep it sounds like you’ve already been through the “Oh no!” nightmare of causing your own disaster. Glad you got your site back!
I recently moved from Blogger to Wordpress. If this would have happened to me then I would have surely been totally confused! Thanks for sharing your experience.
.-= Tech-Freak Stuff´s last blog ..Reveal the Real Long URL behind the Masked Shortened URL =-.
You’re welcome!
If you ever install a plugin that messes things up so badly that you can’t even get into your admin area of your blog, you can go to your wp-content folder, into the plugins folder, and delete that plugin. That will usually fix things right up!