How I Saved My WordPress Site

The other day I tried to update this site using SimpleScripts, a handy tool provided by my web hosting service. SimpleScripts is supposed to take all my WordPress sites and update them simultaneously, saving me the hassle of going in to each of them one by one and updating them from the dashboard. This usually works without any problems, until I tried updating to WordPress 3.1.3.

I’ll preface this by saying that I don’t usually take all the normal precautions before doing a backup. So without backing up my database or my files, disabling any plugins, etc., I went ahead and hit the magical update button.

Then my site died. And I panicked. It’s not that I have a site with critical information, or an e-commerce site that’ll take a hit every time it goes down. I just don’t like it when my stuff doesn’t work.

The error message I got when I went to SpencerBean.com was about a PHP method being declared twice, which is a no-no. So I tracked down the line of code in the file referenced, and commented it out. I refreshed the page, only to find another error message about a different method in a different file. So I tracked that one down and commented it out (I don’t know enough about the inner workings of WordPress to do any better than that). After chasing down four or five methods, I decided it was fruitless and gave up.

Then I saw a nifty button on SimpleScripts to revert to a previous backup (still, never a good idea to rely on other services’ backups), including one from just before the update. So I pressed that magical button, let the site revert, but with no luck. I tried a backup from two months ago. Still nothing but errors messages.

To the forums I went, searching for something–anything–that would shed light on the situation. Googling the methods that were catching only seemed to bring up sites that had the same problem and been left for dead long enough for the Googlebots to find it. I finally found a post that said to copy over all the files and folders EXCEPT the ‘wp-content’ folder. After downloading a fresh copy of WordPress, I copied the files over to my server, replacing the existing ones (note: Do not delete the wp-config.php file. That’s the one with the information for the database connection), and hit refresh . My site was back up. But since I had reverted to a previous backup instance, my most recent month’s of posts were missing. Not cool.

So I went back to SimpleScripts and reverted to the backup made right before I tried to update. It ran just fine, but killed site my again with the same errors. No problem. I simply copied and replaced all the files again (except wp-content and wp-config.php, of course), and I was back in business with my most recent post and the associated comments.

I’ve learned my lesson. Next time I’m going to read the update documentation, make a full backup of both my database and my site files, and THEN run the update. Oh, and I’ll do it from the dashboard instead of SimpleScripts.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>