Dissecting a WordPress Blog Crash

  • Thursday, March 5, 2009 at 10:06 pm //
  • By: ktcosmos //
  • Category: Blogging

This is a really long, detailed post for anyone who may ever have to sort through the labyrinth of possibilities in the aftermath of a blog crash. I wager no one else will ever read it.

The first place to look for help after a crash is the WordPress forum: http://wordpress.org/support/. Using the forum may solve your problem right away as long as your search is precisely worded.

If fixes suggested in the forum don’t work, or your issue isn’t described there, try shouting “HELP!” to your friends and colleagues who are WordPress users. Don’t forget to ask if anyone has experience with your specific issue on Twitter, Facebook and LinkedIn, being sure to identify the version you are running.

Chances are good that you’ll solve your problem at the forum or after Googling it. If you’re like me, you’ll discover that most problems are temporary, easily rectified, and were caused by something you did.

If the cause of your crash is more elusive, contact your host next, in case there is an underlying server issue that only they will be able to discern.

Now, that’s the overview of where to begin, but sometimes even that sequence will turn up nothing. Here’s the anatomy of the crash Loosely Speaking recently experienced. I’ll let my correspondence tell the story.

Symptom 1: “Cannot Connect to Server Database Error”

In early December 2008, I updated this blog to v.2.7. For two months everything worked perfectly. Then, one recent morning, I logged onto my blog to check a predated post that was due to appear on that morning. I was distressed to find this message: “Cannot Connect to Server Database Error.”

Following my own advice, I went to the forums and found references to the “Cannot Connect” problem:

http://wordpress.org/support/topic/146613
http://wordpress.org/support/topic/160033

None of these fixes worked to solve the problem.

Next move, start contacting friends and host.

—-

Thu, 19 Feb 2009 07:30 a.m.
support@myhost.com

Just tried to logon to my blog and am receiving this loading error: “Cannot Connect to Server: Database Error” can you advise?

—-

Thu, 19 Feb 2009 08:31:56
To: Jodi (my friend Jodi Diehl who owns Sun Frog Services and who is always there for me)
Subject: wonder if you can help me out

Hi Jodi,
Leaving town in 30 minutes for a week and naturally when I went to login to my blog this morning I got a “Database Error” message. I have contacted my host, but don’t have any resolution yet.

Meanwhile found this suggestion :

SET PASSWORD FOR some_user@some_host = OLD_PASSWORD(‘your_old password_here’);

at this site: http://www.railshostinginfo.com/blog/2007/03/19/wordpress-installation-error-establishing-a-database-connection/,

which was referenced here:

http://wordpress.org/support/topic/160033

Trouble is, I don’t know how to do this. What do you suggest?

—-

Symptom #2: Blog Redirecting to install.php

—-

Thu, 19 Feb 2009 08:32:56

Tried again to login and now getting this: http://blog.looseends.net/wp-admin/install.php  ???!?

Went back into the forums (as my husband is loading the car for our trip) and found lots of references to this error, but they either didn’t work for me, or involved issues on the host’s end:

http://wordpress.org/support/topic/204527

http://wordpress.org/support/topic/168510?replies=1

http://wordpress.org/support/topic/233328

http://wordpress.org/support/topic/196937?replies=1

http://wordpress.org/support/topic/190805

____

Thu, 19 Feb 2009 8:31:56
To: Jodi
Subject: Re:wonder if you can help me out
Just tried again to login and when I go here: http://blog.looseends.net
I get this: http://blog.looseends.net/wp-admin/install.php
Can’t understand why I would be getting that???
Katie

____

Thu, 19 Feb 2009 8:40
Ewwww – that’s no good!
Are you opposed to upgrading to the latest version of WP?  If you’re ok with that, I can drop in the newest version and see if that overcomes the
problem.
Regards,
Jodi

—-

Thu, 19 Feb 2009 8:42
Dear Jodi,
I already did upgrade to 2.7. Should I try 2.7.1, even though it’s broken or?
Katie

____

Thu, 19 Feb 2009 8:45
If you’ll shoot me that, I can get this fixed for you.  Normally this problem occurs when some of the code is removed from one of the core .php pages. Deleting then re-uploading the wp-admin and wp-includes folders, along with the theme folder usually does the trick.
Do you have a backup of the theme folder by chance prior to this problem
starting?
Regards,
Jodi

—-

Thu, 19 Feb 2009 9:00 a.m. Left for our trip and continued to correspond over next 12 hrs. via Blackberry.

—-

Thu, 19 Feb 2009 10:20 a.m.
From host tech support
We have rebooted the database server. Please try again now. Regards, Host Support

____

While on the road, I let host know site still wasn’t back up. Also let Jodi know I would try a reinstall the next day on my own.

—-

Thu, 19 Feb 2009 11:40 a.m.
Hello,
We are currently looking into this issue and will reply to your ticket once our findings are completed
Regards,
Host Technical Support

—-

Fri, 20 Feb 2009
It appears that you have attempted to upgrade your WP install to v2.7 which has failed. If you can tell us when the upgrade attempt was made we may be able to roll back to a previous backup, otherwise this may require reinstallation.
Regards,
Host Support

—-

My reply: yes, I did upgrade two months ago and have been problem free since that date two months ago.

_____

Fri, 20 Feb 2009

If you can tell us when the last time you blog was working, and the precise version of WP installed at that time we may be able to restore the blog from a backup. However, if the blog has been offline for more than 7 days we will not have a backup on file.

Regards,
Host Support

—-

Sat, 21 Feb 2009

Per Jodi’s suggestion, tried reinstallation of 2.7. No change. Regardless of all this crazy blog stuff,  got to visit newborn granddaughter Layla Gray at the hospital and hold her for the first time. Wow. That puts priorities back in order….

____

Sun, 22 Feb 2009
Heard from my friend Lorelle Van Fossen after leaving a HELP! comment on her blog here:
http://lorelle.wordpress.com/?page_id=3/

Katie,

The first step is the WordPress Support Forum. Did you try there? There are also lists where you can hire someone to help you with WordPress. Automattic WordPress Consultants List, WordPress Jobs, and the WP-Pro mailing list are at the top of my list.

Turn off all your Plugins and see if that helps (rename the Plugin directory via FTP). If you can’t get access via FTP, then you must contact your host.

All the support files you should need are on the web. Consider doing a full clean reinstall of WordPress (delete all the WordPress and upload them again – something might have glitched in the original upload). Run upgrade afterwards.

I know this is tough, but those are my best answers. Your web host may have an issue and this shouldn’t be a WordPress issue unless it is Plugin related. Good luck, and trust me, as someone who live on the road, I’ve done this from the road many times and it always sucks. It also sucks at home. :D

—-

So, good to know I was looking in all the right places…. meanwhile, no change. And, since I can’t access the admin area, I have all kinds of misgivings about hacks and hijackings, and hideous spam.

The good news: my new granddaughter Layla came home from the hospital!

—-

Mon, 23 Feb 2009

I had restored a copy of the database from the backup run the morning of the 18th but the problem has persisted. The only viable solution was to remove all data from the database and let WordPress install a fresh version. I then manually restored your uesrs, pages, posts, comments, terms, and taxonomy. However during the restoration I have found that you have installed one or more WordPress plugins and/or extensions that have modified the core database structure of WordPress. It is likely that these are the culprit in the corruption of your original WordPress installation, and I have not restored the data or database structure associated with these extensions. If you require assitance with these 3rd party extensions I recommend that you contact the vendor or developer from which you purchased or downloaded them from.

Regards,
Host Support

____

And the blog was back up! But, with categories, links and tags missing. Also internal links broken since I need to reinstate my permalinks structure, but do I do that before categories are reinstated or not?? I let “my pal” know I was back online but with a few remaining glitches to sort out.

—-

Tues, 24 Feb 2009
That’s pretty much the suggestion I gave in my email yesterday morning.
Start with fresh install and manually add the data base in (thru DB import).
Glad it’s kinda sorta up for you.  Happy to help continue repairs, but don’t
want to step on tech guy’s toes from your hosting company.  So, shout if you
want/need me to get my hands in there.

Jodi

—-

Symptom #3: Categories, Links, and Tags Missing Following Version Update

Tues, 24 Feb 2009

So, begins the process of trying to get my categories back. One friend told me only I would miss them, but, really my blog isn’t searchable without them. So here are the resources I found for THIS:

http://wordpress.org/support/topic/197548

http://wordpress.org/support/topic/204134

http://wordpress.org/support/topic/195557

http://wordpress.org/support/topic/191189

http://wordpress.org/support/topic/163333

http://wordpress.org/support/topic/167543

http://wordpress.org/support/topic/191795

http://wordpress.org/support/topic/196033

http://wordpress.org/support/topic/204955

http://wordpress.org/support/topic/204306

http://wordpress.org/support/topic/218200

http://blog.cumps.be/wordpress-26-upgrade-fix-missing-categories/

After reading through ALL of those, David Cumps’ made the most sense and had the clearest instruction. So, on to phpMyadmin to modify the tables in my database. I was certain this was the answer, but…. no, still no categories.

Meanwhile, I kept reading and and tearing hair out. Finally asked host if this could have been a hack?

—-

Tues, 24 Feb 2009
We cannot rule out the possibility of a hack, but I did not see any evidence in the core WP tables as I was restoring the data. I have uploaded a copy of the SQL dump that was usde for the restoration to the root of your blog and set the permissions so that it is only accessible via ftp. Any evidence of a hack should be contained in this file.
Host Support

—-

A few days after her initial response, Lorelle checked in again to ask how I was faring. (bless her!)

Wed, 25 Feb 2009
Some Plugins lay “dormant” until they are initiated, like comment forms. If you don’t use them, how would you know there was a problem until they are used. So the issue could be Plugin related if this is the case.
Turn them on one by one and test each one. That will help you track down that issue, if it is one.
Let me know what you figure out.

Lorelle

_____

And then, finally, eleven days after the crash first happened, I woke up to this:

Mon, 2 March 2009
After beating my head against the wall of PHP/mySQL/WP I believe I have narrowed down the issue to a mismatch of database coallations that was preventing WordPress from properly executing the required queries to get your blog’s categories built. I have matched everything to the proper character sets and coallations and your categories and blogroll appear to be working normally now.

Regards,
Host Support

—-

What? What does this even mean? Is it like a miracle? I asked if I dare reupgrade to 2.7, and my host responded:

____

Mon, 2 March 2009
I’ve taken a backup of your site files as they are now, in case something should go wrong with the upgrade, and I already have a current backup of your database from earlier today before I started tinkering. Upgrading to 2.7 is usually quick and painless, the only two things to be aware of would be deactivating all plugins before proceeding with the upgrade, and your themes, plugins, or other modifications are not guaranteed to work with the new version.

WordPress’ extended upgrade instructions are best to follow as the cover pretty much everything:

http://codex.wordpress.org/Upgrading_WordPress_Extended

Regards,
Host Support

____

Tues, 3 March 2009
Hi Katie,

Very glad to hear your blog is back online.  I’ve been watching your Twitter
and FB updates to see how things were going.  I’ve been thinking about you

even though I haven’t had time to check in as of late. I’ll be back Sunday and will be back in full force Monday morning bright and early.  We can set a date for whatever works for you anytime after that.

Regards,
Jodi

—-

Symptom #4: Character Encoding Problems Following Update

The only remaining problem is a bunch of odd characters (like what you see when you paste in content direct from Word) that are now appearing in many older posts. Looking now for a fix that eliminates the need to go back through all those posts to correct manually.

Sure enough, there are some recommended fixes for that here:

Upgrade Problems: Character Encoding and Transformation

Strange Characters in blog posts after upgrade

Ultimate Solution to weird UTF character encoding problem

Phew. Game over.

Speaking of this, here are some related posts elsewhere in Loosely Speaking:

Updating to WordPress 2.7

Busted by Google: Recovering from Hacks



8 Comments


  1. [...] Ignite Orlando Florida Creatives 10th Happy Hour Photos OrlandoPHP: WordPress Plugin Development Dissecting a WordPress Blog Crash – blog.looseends.net 03/06/2009 This is a really long, detailed post for anyone who may ever have [...]


  2. I don’t suppose you know which plugin was the culprit, if it was a plugin.


  3. Andrea, no I couldn’t identify a problem plugin. Nor could I see any hack evidence. I don’t understand the database collation problem my host found, so I fear this crash will always mystify me.

    While that may not help someone who reads this, if they’re having any of the individual symptoms mentioned, it’s my hope their solution will be quickly reconciled via one of the forum fixes.


  4. Wow, quite a journey to get the blog back up it seems, I’m already scared to upgrade again, especially after my last update didn’t go well either :s


  5. Right. I feel the same. All other prior updates have gone great, other than a few little things that were easily remedied in minutes. Your info was terrific, though, even though it didn’t solve my particular problem. Just wanted to make sure people find it since there were so many reports of the categories/links problem you solved.

    Thank you for writing.


  6. Top Stuff
    Im enjoying this site. Please keep up the great stuff.
    Sandy Woong


  7. We also use WP. This is handy info to have. Thanks! Our blog is fairly recent so we haven’t done any upgrades yet.

    Your blog theme is really nice, did you design it yourself?


  8. Hi Isobel,

    Thank you. The blog theme I used originally is called Boxy Blue and it was created by Jennifer Ledbetter. I’ve modified the CSS and substituted different header art and changed other features as I thought of them. Love WordPress!

Leave a Reply