Comments table crashed, HostGator to the rescue

I finally upgraded my WordPress install today, and like a responsible web admin, I backed up my database and also my file tree. After my upgrade I noticed that my comments were all gone! I grumbled a bit and figured I’d extract the files from my backup. I opened my file up and noticed there were no comments. Doh! Where are they? I checked my backup from June, no comments. The latest backup I had with comments included was from February. The phpMyAdmin console showed the table “in use”. Not sure exactly what to do, I opened up a quick Live Chat with my hosting provider, HostGator, and noticed that I was #1 in queue with what, 147 agents available? My problem was fixed in less than 5 minutes. The fix also recovered a few comments that were posted after my last good backup.

I apologize to those of you that tried posting comments the past few months, because they were all eaten up due to the table being locked. I’m not sure what happened, but the support guy told me how to fix it myself if it ever happens again. Essentially, there’s a GUI in the cPanel to check and repair individual databases. I work with MySQL quite a bit at work, but I wouldn’t consider myself a DBA. Now I need to find a better WordPress backup plugin, because I think it should have thrown out some type of error if the table wasn’t readable.

Anyway, I’d like to take this opportunity to recommend HostGator. If you need hosting, please check them out. Any signups done through my link will help pay for my web hosting. Also, you can use code SCIFI25OFF for 25% off your first order. They offer 1 click WordPress installations if you are looking for something like that.

Here are my steps prior to all WordPress upgrades:

  1. Backup Database via Plugin, also can be done through phpMyAdmin
  2. Open cPanel and through File Manager, copy my WordPress directory “/installdir” to another directory like “install2011backup”. I think you can only do this quickly if your blog is not installed directly into the root /  – note, this takes just SECONDS, rather than downloading thousands of individual files
  3. Run upgrade, hope for the best

Here is how I restore

  1. Restore Database via phpMyAdmin
  2. rename install directory to /install-bad
  3. rename backup directory from /install2011backup to /install

Do you have a blog? What is your disaster recovery plan?

1 thought on “Comments table crashed, HostGator to the rescue”

  1. Sounds a lot like a case of broken tables. You can fix this yourself in phpmyadmin a lot of the time by using the query

    REPAIR TABLE $tablename

    that will restore the table quickly for you should this happen in the future.

    You can probably make a crontab to auto check / repair tables once every so often to help prevent down-time.

    Hope this helps out 🙂

Leave a Reply

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

Please prove you are a human * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Post

Wrapping it up, the epic saga of Isaac Asimov’s Robot and Foundation Universe – PrologueWrapping it up, the epic saga of Isaac Asimov’s Robot and Foundation Universe – Prologue

Almost three years ago I set out on a massive project to read all 36 of the books in the Robot and Foundation Universe. The main thing that prompted me to start this project was an eBay auction that had a specific book I was looking for (The End of Eternity, which is loosely connected to this project) and several other books which I’ve already read. I purchased about 16 books in a lot for about $35 total. After finding this deal I decided to try and purchase every book in the series, which I eventually accomplished. (more…)

So where did 2016 go?So where did 2016 go?

I think the theme of 2016 for me was procrastination regarding this site. I had planned on reviewing The Force Awakens when I got back from Christmas vacation, but I kept putting it off. I certainly did not stop listening to, reading, or watching Sci-Fi. The last movie I watched was actually Rogue One, which was great! I guess I’m a bit selfish, as I certainly could have carved out the time to write reviews, but I had other priorities. I was working with my wife on a  job search that took up almost all most of my free time, and hers. What free time I did have was spent watching TV to unwind after applying for jobs. We didn’t start keeping track until June, but between then and October we applied to 50 different jobs. In the end I found possibly the best job out of them all, in an area we want to live. Hopefully in 2017 I can possibly circle back and write up some high level reviews of stuff from 2016. My commute now is just over an hour on public transit, so I’ll be plowing through audiobooks like crazy at roughly 2 hours a day. I’ll try to take some time for posts about new books, movies, and games in 2017, but no promises!

Comments enabled, RSS liveComments enabled, RSS live

Comments are enabled – I’ve enabled user registration (it takes just 30 seconds), so please register if you have the time. WordPress usernames are case sensitive, so keep that in mind when creating accounts and logging in. I look forward to seeing comments, however you don’t need to create an account to post a comment.

Also, I think I’m pretty much done fiddling with the site layout. I’m probably going to play around with the logo a bit and add a few more things to the right sidebar. I’ve also registered with Technorati and Feedburner to distribute RSS feeds.