How to Waste a Perfectly Good Sunday...

Services for Real Estate Pros with API Network

..Upgrade from Wordpress 2.5 to 2.6

Wanting to help someone learn about how to upgrade, and to help the owner of a Wordpress site, I figured Sunday was a good day to go from an old Wordpress version to a newer one.  I had done tens of hundreds of similar upgrades but none of that mattered as I failed miserably.

Here's how it normally goes when upgrading a content management system, including Wordpress:

  1. Backup the site
  2. Copy over the new files
  3. Run an upgrade script
  4. Test it

The bulk of the time is usually #2, waiting for files to copy. In the case of 2.6.1 of Wordpress, that's about 564 files in 74 directories, just over 4 megs of data. Even at a slow WiFi cafe, that's maybe 15 minutes.

After doing the backup, something caught my eye. A shortcut! I love shortcuts. Who could resist?

Simple simple simple

After a quick click, the home page of the site was looking good which meant I was 99% done.  I just needed to confirm the backend (admin) part was good-to-go.   It was horribly not ready: I had encountered the often feared Wordpress white-screen-of-death:

Fatal error: Allowed memory size of 8388608 bytes exhausted

(tried to allocate 77824 bytes) on .../template.php on line 498

Fatal PHP errors. Big deal. They sound scary, but stuff like this is usually something simple. Seriously, an extra space at the end of a config file can make things ugly, fast.  I rolled up the sleeves and took a look at the file that was complaining: template.php.

This is not a good sign

Seriously. This is how template.php begins. This is the hello to all those who may venture in searching for a clue. No official Wordpress header telling who wrote it, the type of license, where to go to report bugs.

Big mess and ugly.

When the source code of the software you're trying to fix begins with someone saying it's a big mess, and ugly... that's your cue to look elsewhere for a solution.

Ok, fine.  Forget template.php. Forget this fatal memory stuff.  I'm comfortable admitting I can't solve this via line 498.  So what's next?   What I should have done first:  Ask Google.

33,000+ refereneces to "fatal error" and Wordpress.  Hmmm.  I'm thinking I'm not the first one to stumble into this briar patch.  Looks like these guys might have already gone down this road.

One of many warnings about 2.6

Ok. Fine. No problem. I hosed the site. I've done that before. Not all that terrible. Restore from backup. Problem was likely that quickie shortcut Fantastico thing.   I should have gone from 2.5 to 2.6.1...  After 20 minutes of copying and cursing, WP 2.5 was back.  ahhh

Now to do it correctly: I'll do the upgrade from 2.5 to 2.6.1 ... but manually this time.   After another half hour of copying files, I had trashed the site again.  Same error, same template.php file, just a different number of bytes.


So ... back to 2.5 we went, for the second time, which is where it sits today.

My moral of the story:

If you're thinking about running your own Wordpress site, be aware that upgrades are required on a regular basis but just because they release a new one doesn't mean it's better than what you have.  

Google before you start the upgrade.

Make sure the person/company that does the original install will be available for upgrades.  Don't assume that links like "Click here to upgrade" work.

Before you decide to venture off to toil in your own Wordpress garden, make sure you have fully embraced and understand ActiveRain.   Consider AR as must-have training.   Once you master all of what's here, then consider building your own.

Searching for solutions to fatal memory errors is no way to spend a Sunday afternoon.

PS.  I'm pretty sure I know what the problem is ... and will post what I find later this week when I get around to testing my hunch.


This entry hasn't been re-blogged:

Re-Blogged By Re-Blogged At

Spam prevention
Show All Comments
Aaron Cullen
Brokers Inc. Residential Real estate - Folsom, CA
Folsom, El Dorado Hills & Sacramento Real Estate &

Hey Kasey, I love using computers, but my stomach turns when I have to work on them. Sounds like a lousy Sunday.... Good luck!

Aug 25, 2008 02:04 AM #1
Cheryl Johnson
Highland Park, CA

I finally got around to updating all my wordpress sites (I have 7) to 2.6 a couple weeks ago.  My upgrades all went OK this time... biggest PITA was having to clear browser cache before WP would let me log in again....  Then about two days after I did the updates the 2.6.1 message appeared.   Awww man.

Aug 25, 2008 03:06 AM #2
Kasey Kase
API Network - Mequon, WI
I'm not really a pirate

Thanks for the feedback/encouragement. In case anyone should bump into this problem, here's what I did to fix it.

I installed a copy of the 2.5 site to another server, then performed the upgrade there to confirm this was a PHP/server related problem. (Sure, you can still point the finger at WP, but unless you have full control over the server, that's a nut you'll never crack)

After changing DNS on the domain name to point to the new server, I then installed the updated 2.6.1 version into the new home.  In about an hour, the name was resolving and the upgrade was officially done.

Granted, switching servers isn't always a simple option, but in this case, trying to get the old one to work just wasn't worth the time it would have required.

As long as you're hosting with a company that really supports WP, all of this could have been avoided ... but considering the 33,000+ references to it in Google... it happens!

Aug 25, 2008 04:42 AM #3
Show All Comments

What's the reason you're reporting this blog entry?

Are you sure you want to report this blog entry as spam?


Kasey Kase

I'm not really a pirate
Ask me a question
Spam prevention

Additional Information