Automated WordPress MU Upgrade Script

Filed under: WordPress by J de Silva @ 4:12 pm on June 30, 2007.

Recently, the good people at wordpress.org released an upgraded version of their WordPress MU script, and so I had to drop everything else that I was doing to install the upgrade here.

It took me 4 days but I installed the update today, and amazingly, everything seems to be still working! I am amazed because for the first time in my life, I updated the site by running a shell application, one that I wrote myself. It took me a while to write the PHP CLI SAPI shell application that completely automates the whole WPMU upgrade process, but I think it was worth all the effort, because from now on, I just need to run this one script and GIDBlog.com will be updated within minutes, and I don’t have to remember all the details or go through lines upon lines of upgrade instructions.

The automated upgrade script handles nearly everything, from downloading the WordPress MU (tar) file down into this web server, extracting the tar.gz file, creating the MySQL and file backups, moving (or deleting) the required files into (or out of) the wp-content folder, to even controlling (stopping and restarting) the httpd daemon while the upgrade is in progress!

Now I can’t wait for the next WordPress MU upgrade — I’ll just log into this server, type:

> upgrade_wpmu.php

on the command line, and within a few minutes, this web site will be upgraded. It’s just too cool! I don’t know why I never thought of doing this before!

Meanwhile, if you find something not working right, just leave a comment below.  I am good, but maybe not that good! :P

Google’s Custom Search Engine May Not Return Some Of Your Pages

Filed under: Blogging Tips by J de Silva @ 12:22 am on June 9, 2007.

I will start this post by asking a couple of questions:

  1. Are you using Google’s Custom Search Site or AdSense for Search for your web site?
  2. Are you sure it’s returning ALL of your pages or content related to a particular search?
  3. Are you absolutely sure?

Okay, that’s 3 questions actually, but nevermind the details. :)

> more <

GIDBlog Analytics Error

Filed under: Uncategorized by J de Silva @ 11:44 pm on June 3, 2007.

I made a silly mistake setting up the Google Analytics account for this web site, and I only recently figured it out.

If you manage a web log here at GIDBlog, then you know you can view the stats for this site via Google Analytics. Anyway, for quite some time, there seemed to be no traffic to any of the blogs except one, at least according to the reports available at Google Analytics.

What happened was that I had somehow entered a include pattern filter — I guess I was trying to figure things out and forgot to remove the setting — which resulted in only stats to just one blog being reported, ignoring all others.

Since yesterday, I removed this ‘filter’ and from now on, the reports should be accurate.

GIDNetwork Offline for 2 Days, What Happened?

Filed under: Web Hosting by J de Silva @ 6:35 pm on June 2, 2007.

On May 29th, 2007, at around 4:00 p.m. (Malaysian time), the web server that hosts all the GIDNetwork sites crashed. Every time the support team at the data centre restarted the dedicated server, it crashed, again and again.

It must have been a computer hardware problem, although I am still not certain what was actually the item that was failing. Looking at the messages in the log file revealed many lines like this:

May 29 05:28:57 yumie kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
May 29 05:28:57 yumie kernel: hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
May 29 05:28:57 yumie kernel: ide: failed opcode was: unknown
May 29 05:28:57 yumie kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
May 29 05:28:57 yumie kernel: hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
May 29 05:28:57 yumie kernel: ide: failed opcode was: unknown
May 29 05:28:57 yumie kernel: hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
May 29 05:28:57 yumie kernel: hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
May 29 05:28:57 yumie kernel: ide: failed opcode was: unknown

A quick search online hinted that this could be an issue related to a Hard Disk Drive (HDD) failing, or something as simple as a faulty IDE cable, neither of which we could figure out for sure. So the kind people at WholesaleInternet decided to replace everything, from new HDDs, to the processor and main-board of this server.

That took a while, and because the most recent backup I had on my own PC here in KL was over 1 week old, I didn’t want to restore the server with it. I knew there was a current backup on the old HDD and appealed to the support techs to copy the files onto the new HDD. Well, to make a long story short, they could not mount the (old) hard disc drive no matter what they tried. Much of Wednesday (May 30) was lost waiting for them to get files moved.

Later that night, I met with Darrin Smith online and he was kind enough to offer to help. Within minutes of logging into the server he got the HDD/partition mounted and I could finally access the files, move the backups to a safe place on the new HDD, and proceed with the restore, and bringing the sites back online.

I would like to thank all the good people at WholesaleInternet, especially Brian Vlasenko, who stayed up through the night trying to solve the problem, for eventually replacing nearly all the hardware, and reloading the Operating System and required software for the server on a new HDD.

A special thank you to Darrin for saving us all from losing over a week’s worth of data. :)

May nothing like this happens ever again…

Theme designed by J de Silva exclusively for GIDBlog.com.