A huge mistake, and disaster averted

Yep

Other than not being a woman, I know just how that lady feels. Today was a bad day, and her expression was my exact expression earlier. You’ll notice over to the right, on the twitter feed, the words “OR DON’T.” That was the header image to a post I had written about two separate attacks this month that targeted remote access software. One attack on June 1st compromised TeamViewer, a program I use myself, and the second, more recent attack targeted GoToMyPC, hence the OR DON’T. Get it? Anyway, both were based on password reuse, so change your passwords if you’re affected. Or even if you’re not.

However after I posted it, I noticed that the LightBox functionality was not working on recent posts. LightBox is the function that causes an image to expand when you click on it while darkening the background. It’s only not working on recent posts, for older posts it works fine. I didn’t know why, and started to investigate.

I made some changes, made some edits, nothing worked. Then, I made a change to the functions.php file that anchors the theme I’m using for this site, and that’s when NOTHING worked. On refresh, this is what I saw at is301.com:

This is bad

This is bad

If you click on it to zoom in, you’ll see that it reads:

Parse error: syntax error, unexpected ”);’ (T_CONSTANT_ENCAPSED_STRING) in /home/content/p3pnexwpnas01_data03/57/2195057/html/wp-content/themes/TechBits/functions.php on line 38

That’s all I could get, the whole site had crashed and I knew it was going to be no easy task to save it. I felt sick, I started to panic, but I also had downloaded a pre-edit version of the file before I started working on it. I figured I’d ftp that back to the server and get everything back the way it was. The problem was, I couldn’t remember my ftp login credentials.

I called GoDaddy, who hosts my site, explained what happened, and it turned out they had backed up the whole site the night before! After a 30-second restore, I was back up and running with only one post lost to the ether. If you clink on the link in the Tweet, which I’m deliberately leaving up, you’ll get a 404 error, of course.

I’m still shaky over the thought of losing the site I have nurtured for years, but one post is a small price to pay for getting it all back. Plus, this is a good opportunity to remind everyone to always make backups, and not test live! It’s a lesson I already knew but had to learn again the hard way; complacency will get you every time. I’ll go back to using XAMPP for local testing before major changes.

Also, major kudos to GoDaddy for having such a complete and effective backup procedure and easy recovery process. I couldn’t be happier, impressed, and, frankly, relieved.

And on top of all that, I figured out the LightBox problem, which was a very simple selection from a drop-down box.

I think I need a nap.

Going Up