Welcome to The blog of whall

Come on in and stay a while… laugh a little. Maybe even think. Read more...

Hi, This is Wayne. This is my site, my stuff, my blog, blahblahblah. The site itself is powered by WordPress and the Scary Little theme. I thought it was cool, and I still do.

May
6
2010
10:55 am
Categories:
Tags:
Post Meta :

I’ve hit my head against the virtual wall (whall?) more times than I can count over the past few years on something that I suddenly “fixed” recently, and I wanted to blog it for the masses.

In short,

If you’re running WordPress or any PHP-based application on a host that has both PHP 4.0 and 5.0 installed, append the following to your .htaccess file for that application:

Options All -Indexes

As an added bonus, I also detail how to upgrade MySQL 4.0 database to MySQL 5.0 on 1 & 1 hosting (see extended entry below).

I use 1 & 1 for my internet hosting, and have since, oh, 2003 or so. For the price I pay and the service I get, I’m very happy. There have been a few glitches, to be sure, and I’ve blogged about a few of them. But overall, I’ve been a happy camper.

I mention 1 & 1 because on all their shared hosting packages, they install both PHP 4.0 and 5.0. Ever since I can remember, I’ve had the dreaded “Internal Server Error 500” on a few things on my blog, like exporting my blog to XML as a backup, or similar tasks. Sure, I can always do the manual MySQL backup because I’m a geek, but it annoyed me that I couldn’t do the XML backup. Also, some plugins just wouldn’t work right, and auto-upgrade almost NEVER worked.

This inability to auto-upgrade also frustrated some of the people I host blogs for. Yes, I host blogs. For those special few in my life (heh) I will set up, install, configure and host a wordpress blog so they don’t have to worry about it. I typically only have them pay for the domain name (\$10 a year or so) and I host the site for free. I host more than a hundred domains, including personal blogs, commercial blogs, non-profit websites, and I use WordPress, Joomla, Drupal and even raw HTML (the shock and awe!), wherever appropriate. It’s not a money maker for me, and I only ask that if someone I host gets wildly popular and makes millions of dollars, that they kindly remember me on my birthday.

On every WordPress blog I hosted, the authors weren’t able to consistently install or update plugins, or perform the auto-update feature inside of WordPress. It would either give that infernal Internal Server Error 500 or it would just hang. So, they’d email me, I’d procrastinate, they’d nudge, I’d forget, they’d ask politely a fortieth time, I’d promise to do it, and then eventually I’d manually upgrade their plugins a year later.

I’m happy to say that the above .htaccess file changes have completely eradicated the auto-upgrade errors, and I can perform the XML backups all day long without a problem. Not only that, but my blog actually seems faster. In case you care, the .htaccess lines tell Apache (the web server running on the host) to use PHP 5.0 to process all the files ending in .php instead of the default of PHP 4.0.

I’d do a happy dance if there weren’t so many adoring fans surrounding me, restricting my movements.

For the big WordPress 2.9 upgrade that I’ve been putting off, I was also challenged by the fact that my personal blog as well as a few blogs I host used the older MySQL 4.0 databases instead of the newer MySQL 5.0 databases. WordPress 2.9 required a later version of 4.0 than 1 & 1 had installed, and I was wary of diving into the “upgrade MySQL 4.0 database to 5.0” process.

Until last night.

The database upgrade went quite smoothly (this post was most helpful). In fact, I got it down to a science – take the values from the wp-config.php file (database name, username, and host name) and put it into the mysqldump / mysql commands to pull from the old 4.0 database and insert into the new 5.0 database.

My steps, for those interested and the inevitable Google searches that will land here, are documented in the extended version below.

Once I upgraded my MySQL Database to 5.0 and added the .htaccess lines at the top of the post, the WordPress 2.9 auto-upgrade was a cinch. Not only that, but several of the plugins that wouldn’t auto-update updated without issue. It was so easy and fun that I upgraded a few dozen blogs and their plugins as well.

Needless to say, I was quite pleased with myself. I’m celebrating by actually taking time to blog about it so you can be pleased with me, too!

If geekiness of this nature doesn’t please you, then maybe this Tom Tom Darth Vader behind the scenes video will.

Enjoy 🙂

(more…)

January
4
2009
3:05 pm
Categories:
Tags:
Post Meta :

Sometimes things are more complicated than they need to be.  Like Macbook Pros running OSx Leopard.  You’d think that the “common man’s” laptop that’s supposedly for the “artist-driven” and “creative” folk would make some sense.  But everywhere I turn, things are just plain confusing.

More on that later.

This post marks my 1000th post.  I just upgraded to WordPress 2.7 a few moments ago after writing up the following.  After fixing some plugin issues (a few caused my admin page to give server errors), I came back to edit my post and noticed I had 999 posts.

1000 posts is pretty big.  I wonder if I should give something away.  Then again, I’ve given some things away on past entries that I still haven’t finished delivering (but I will, I promise!).  So maybe the upgrade to 2.7 is my own gift to myself.

This post is about my convoluted WordPress upgrade.  Wordpress is what I use to run my blog.  I’ve been on WordPress for a while now (3.5 years) and have been through a fair share of upgrades.  I’m also pretty geeky – I can do lots of stuff from the command line and know WordPress well enough.  I’ve upgraded other blogs to the latest WordPress 2.7 without a problem, and usually in less than 5 minutes.

But I have a little problem, as I’ve mentioned before.  With all these upgrades I’ve done over the years, there’s something amiss with the blog.  Specifically, the database has issues.  Anytime I try to do a backup of my blog with the tried-and-true WP-DB-Backup plugin, it fails (stuck at wp_options, and the page doesn’t refresh itself).

Here’s how stupid it is – this backup hasn’t worked for over a year now.  So, what happens when I go and re-try it again just now, just so I can get a screenshot?

Go ahead, guess.  YUP.  The stupid thing actually WORKS.  So now I have a good backup.  SHEESH.

The other problem I constantly had was when I try to use the built-in Export function of WordPress, it fails as well (server error 500).  Maybe I’ll be lucky and it’ll work this time.

Nope.  Well at least half of my complaints are still valid.

Anyway.  Where was I?  Oh yeah, failures.  Ok, so now I have a backup.  I like having more than one backup, so I also want to do a MySQL backup *and* a filesystem backup.  I’m putting those in the extended entry below for those of you who’d like to know how to do that.

Now that those two things are done (see the extended entry for additional info), I need to download the latest 2.7 upgrade.  I keep all my plugins, themes, and code in my ~/src directory.

(uiserver):whall:~/src/wordpress > wget http://wordpress.org/latest.zip
--14:20:41--  http://wordpress.org/latest.zip
=> latest.zip'
Resolving wordpress.org... 72.233.56.139, 72.233.56.138
Connecting to wordpress.org|72.233.56.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
[  <=>        ] 1,849,558      4.80M/s
14:20:42 (4.79 MB/s) - latest.zip' saved [1849558]
(uiserver):whall:~/src/wordpress > mv latest.zip latest-27.zip

I also like having the multiple versions around, so I move latest.zip to latest-27.zip.

The next thing to do is double-check and triple-check the Upgrading WordPress guide.  Here’s what I did with this upgrade:

1. Verified my backups
2. Did more backups
3. Said a little prayer for my backups
4. Downloaded the latest wordpress files (above)
5. Deactivated plugins
Now I need to follow more of the directions.  I unzip the wordpress files into a separate directory (~/wordpress)
(uiserver):whall:~ > unzip ~/src/wordpress/latest-27.zip
This extracts the files into ~/wordpress for temporary use.  Note that my blog is in ~/blog, remember?  Some people put their blog into ~/wordpress, so if you actually have your blog in that directory, you’ll want to do something else.
The directions say to delete the wp-includes and wp-admin directories.  I know in the past when I forgot to do this step, it’s not a good thing.  So make sure you do it.
(uiserver):whall:~ > cd blog
(uiserver):whall:~/blog > \rm -rf wp-includes/ wp-admin/
Notice I used backslash in front of “rm” because I didn’t want it to use an alias, if any.  I frequently alias “rm” to be “rm -i” so that it confirms deletions.  This way, with the -rf option, it recursively deletes the two directories in my blog directory.
Then I use my special tar command to take the new wordpress 2.7 files to stomp on top of my existing directory, but keeping any other files that I have.  This is important, because I don’t want to lose my plugins, themes, or uploaded files.
(uiserver):whall:~/blog > cd ../wordpress
(uiserver):whall:~/wordpress > tar cvf - . | (cd ../blog; tar xfBp -)
The final step is to visit the wp-admin page of your blog to check for an upgrade and continue on.  If all goes well, the upgrade is complete and you can start turning plugins on one-by-one to make sure they work.
Now, I wrote all of this BEFORE doing my upgrade, so I’m about to do another backup and then actually perform the steps.  If it all goes well, I’ll be on WordPress 2.7 and will publish this post.
If not, well, I might still publish it just to complain.
Update: it seems to have gone well, since I’m now editing this post in all it’s WordPress 2.7 glory.  Now to publish and hope it doesn’t break, and then to maybe do some more backups now that I’m on the latest version.
December
23
2008
8:19 am
Categories:
Tags:
Post Meta :

Note: This blog post is also available via audio.  It is read by the author on Utterli.

My blog is powered by WordPress.  You know, that open source, free-is-all-you-pay, all the OTHER kids are doing it blog software.  Me like it long time.  I host several blogs on my account since I have about as much bandwidth allowance per month as a Congressional Bailout and approximately 17 gobs of disk space available.  I have 100+ domains (some of which were just domain speculation and run nothing but domain parking) and host several blogs for other bloggers, too.

Recently, WordPress released 2.7 – probably the biggest, coolest, awesomest WordPress upgrade that I can remember.

I’ve upgraded a few folks to WordPress 2.7 for them.  I’ve installed 2.7 and like it a lot.  I’ve even set up a fake blog that anyone can register with and play with 2.7 if they want to try it out before they upgrade themselves.  Yes, that offer’s still open.  I also created a “mu” blog if anyone wants to play with the multi-user version of WordPress and actually create their own entire blog and not just blog with others.

But I have this problem with my blog.  [insert sappy violins playing sad emotionally carrying music].  You see, it was born a long long time ago when WordPress births were still a little difficult.  [pause to compose myself] It’s been upgraded and upgraded and upgraded so many times I’ve lost count. [sniff]  And now, sadly, I can no longer do [sniff] an export of the data.  [sob] I can’t even do a WP-DB-Backup any more! [cry].  All I can muster [sniffle] is a MySQL backup [sob] every now and again just in case something blows up! [uncontrollable crying].

[re-compose myself]

So, I don’t feel adventurous enough to complete a 2.7 upgrade for myself without good backups.  I’m worried that if exports don’t work and the wp-db-backup plugin fails, that the 2.7 upgrade will also fail, and then that’ll mean doing a restore process I haven’t tested.

Maybe I’ll try it over this Christmas break when fewer people are reading blogs.  Maybe now that I’ve slowed down my own blogging over the last few weeks (and thusly, the commenting), I might have the respite I need because business is slow, so to speak.

Maybe I should try staples like Scrooge, played by Bill Murray, suggests.

July
16
2008
8:51 am
Categories:
Tags:
Post Meta :

So, it seems 2.6 is out, the “latest stable release of WordPress”

So, anyone dare me to upgrade first?  Don’t be shy.

I’m at 2.3.3 cuz I chickened out of upgrading to 2.5 or 2.5.1 after a few issues I had with some of the blogs I help support.

October
7
2007
10:20 am
Categories:
Tags:
Post Meta :

The weeks are flying by.  Can you believe it’s October already?  Heck, I can hardly believe it’s 2007!  That means 2010 is right around the corner — I remember when I was a kid and thinking that 2010 was SO FAR AWAY.  Well, ok I guess it was, but still.  It’s truly amazing.

### The Leg.  Sweep it.

Here’s my homage to Karate Kid.  Easily one of my favorite movies from that year (whatever year it was).

So for you I give you two things – a video for “You’re The Best” and an inspirational poster.

(click for larger version)

### Another WordPress Upgrade, done

It seems like only yesterday (ok, it was a couple weeks ago) that I blogged about upgrading my version of WordPress (the software that powers my blog), and there was a lively discussion about profanity, plugins, and Avi’s immediate suggestion that I incorporate tags vs categories.  It didn’t take long for me to heartily agree – Categories should be used in a much more general way of, well, for lack of better term – categorize – the posts, and I can see maybe a couple dozen categories at most.  Tags, on the other hand, should consist of keywords related to the post, and are more free form, context-driven pieces that help with search engines and the like.  to me, Categories are for browsing, tags are for searching.

I was very close to getting the Ultimate Tag Warrier as Avi suggested, but ended up procrastinating.  Now I’m glad I did – WordPress 2.3 has inherent tag support!  So I dropped everything (sorry, coffee mug; I didn’t like you much anyway) and did the upgrade Friday afternoon where no-one does internet surfing.  I had my maintenance page back up for about 6 minutes while I did all the upgrading, and it went without a hitch.  I did have to upgrade my Get Recent Comments plugin, tho.

Now I’m at 2.3, as evidenced by this handy screenshot that’s documented and certified impossible to forge:

There are tons of new features, all of which seem very logical and worth the upgrade.  I haven’t really seen if SpotMilk welcomes the changes or shuns them, but for now just the tags are good enough.

Oooh, and now I get a tag cloud!  Built-in!

It will be extremely difficult to not re-tag EVERY SINGLE POST on my blog.  I only have 740 of them in 368 categories.  0 tags for now.  Well, I take that back.  When I submit THIS post I’ll have a few tags — 🙂  I wonder if there’s a ‘netiquette for this.  As Waynal as I am, I’m going to be re-tagging posts that I think need it.

My theme doesn’t support tags vs categories yet; in fact, the theme calls categories “tags”, so I’ll either have to look for an upgrade or just make the mods myself.  I’m betting I’ll have to make the change myself, but that’s ok.  I think I’ll go for the categories being “Posted in (category)” and Tags just saying “Tags: (tag, tag, tag)”.

Any suggestions?

### Best of the LOLcats

I knows some of you don’t “get” the lolcats.  And by that I’m not saying you’re stupid or don’t understand it, I’m saying you don’t find it as funny.  That’s like me telling my wife she doesn’t “get” The Simpsons – I’m not saying she doesn’t get the jokes.

So let me know your opinion(s) of these, if any.