Workaround for WordPress Out of Memory Errors when Upgrading

Because of my internet host and the number of plugins I run on my blog, I get an "out of memory" error in WordPress each time I try to automatically upgrade my wordpress install from the admin pages.

Long story short, I run out of available memory because I am using a large amount of memory for the MySQL & PHP processes.

The good news is… there's a real simple work around that will allow you to automatically upgrade your WordPress version with very little effort.

Work Around for WordPress Out of Memory Errors on Upgrade

  • Within WordPress admin, bulk select & disable all plugins.
  • Perform the one click upgrade of your WordPress installation.
  • Return to the plugin page & enable your plugins.

Again, this is just a workaround. Your milage may vary.

Oh… and one more thing. Always backup your WordPress installation before making upgrades. (Too lazy to upgrade? Use this plugin!)

WordPress Users: Eat your vegetables!

High profile blogger Robert Scoble had his WordPress blog hacked this week by hackers who exploited a documented bug in WordPress and deleted a large number of his posts.

The sad reality is that it never should have happened.

WordPress knew about the vulnerability and released a system update last month to protect users. However, Robert – who prides himself on being the guy who is "exploring the 2010 web" – Robert ignored the repeated system messages to upgrade for security reasons. To make matters worse, Robert didn't have any WordPress backup system in place.

It's very simple, WordPress users: YOU HAVE TO EAT YOUR VEGETABLES.

Self-hosted WordPress users should *always* install system updates. Period. End of Story. It couldn't be easier, as WordPress literally has a one-click upgrade feature. Stumped? WordPress has phone support – free for the first three minutes. Upgrading keeps your blog and personal data secure. To date, no one who has implemented the suggested free upgrades has been hacked.

In addition to installing system updates, self-hosted WordPress users should have a backup plan. There's even a *great* backup plugin that can run on its own and email you the backup!

Run your updates. Run your backups. Run your updates. Run your backups. Run your updates. Run your backups. Run your updates. Run your backups.

And eat your vegetables!

FriendFeed-Facebook deal reaffirms need for a social media safety net

As I've mentioned before, I'm a big fan of digital lifestreams, a single page overview of your online & offline world. I have my own lifestream that features not only what I'm doing on my blog or other websites, but also ties in what I'm doing offline through pictures & videos. (Check out my lifestream, if you like!)

As focus on aggregated lifestreams (or socialstreams, as they are sometimes being called) has evolved, several really good sites have popped up which allow you to create your own lifestream, including soup.io, Profilactic, and – most notably – FriendFeed. Given the simplicity of these great tools, thousands have flocked to these services.

However, with the recent purchase of FriendFeed by Facebook (Friendbook? Facefeed?), it now appears that the future of FriendFeed may be in jeopardy. If FriendFeed folds – just as Swurl & Jaiku did earlier – it could erase (literally) millions of digital landmarks in thousands of user's lifestreams. Since lifestreams are generated as they happen, there's a real possibility that those users will never be able to recreate their lifestreams. Now, thousands of FriendFeed users are looking for ways to back up their lifestream before it disappears.

But the sad reality is, this didn't need to happen.
Continue reading FriendFeed-Facebook deal reaffirms need for a social media safety net

Roll Your Own URL Shortener with WordPress in less than One Hour

With the closing of the tr.im url shortening service yesterday, many users are beginning to worry about what will happen to all of their shortened URLs.

The reality of the situation is that many almost every social media service – including twitter, friendfeed, jaiku, indenti.ca, etc, etc – all rely on URL shortening services. (After all, it's hard to have short messages with long urls, right?) But if those services cease to exist, many of the links that have been cultivated, traded, and broadcast will cease to function. In other words, all of your tweets & posts could ultimately become lost or broken links.

The solution? Create your own URL shortening service using WordPress!

Not only will you you ensure that your links don't become broken or rot, but you'll also have complete access to click-through statistics, be able to custom tailor the link name & appearance, and you can harness the power to promote your own brand!

Continue reading Roll Your Own URL Shortener with WordPress in less than One Hour

How To: Conditional Adsense Ads Display in WordPress

I get a decent number of emails asking how I show Google Adsense ads on older WordPress posts on my blog.

Although there may be plugins for WordPress that allow you to display Google Adsense ads based on the age of a post, there weren't any when I needed them years ago. So… here is the php code that I use to show adsense ads on older posts:


<?php /* Check if post and age for adsense */ if (is_single()) { ?>
<!-- insert google ad based on post age KD -->
<?php
$days_since = floor((date('U') - get_the_time('U')) / 86400);
if($days_since >= 20) {
echo '~~~~~~~~~~~~~~'; }
?><?php } ?>

(Click here to see an older post that has Adsense ads – both in the sidebar and after the post)

In a nutshell, this php code determines if the page being displayed is a single entry, if wordpress post is at least 20 days old and — if both conditions are met — inserts the Google Adesnse code.

To use this on your wordpress blog, simply replace ~~~~~~~~~~~~~~ in the code above with your adsense javascript code and insert the code into your templates where you would have the ads appear. On my blog, I paste this code into a text widget in my sidebar, as well as in the post-footer.

If you want to expand on the idea to showing adsense conditionally, you can modify this code fragment to work with a variety of WordPress conditional tags.

My Blog Evolution

One of these days, I'm actually going to sit down and write out the evolution of my blog. Given the amount of time I'm spending on my Lifestream, I guess I better hurry before "blog" goes out with the dinosaurs!

1997-2001

Luckily, no screenshots survived the "dark era" of Xoom.com hosted websites.

2001 (Greymatter)

We bought our domain names in 2001 and launched KevinDonahue.com and MerrinDonahue.com. After a little work setting up the Greymatter websites (perl ftw!), we even built a "home" page with server-side includes of our three most recent posts. Still… the most lasting element is the ridiculously cool animated CRT logo that tied both of our blogs together.

Circa 2001

2003(MovableType)

Remember when MovableType was the stuff? Yeah… me too. We rocked MT blogs for three and a half years.

Circa 2003

2004-2006 (MovableType)

Circa 2004

2006-2009 (WordPress)

We upgraded the blogs to WordPress in 2006. Since then, I've basically run three different versions of Kubrick, and then dilly-dallied with a couple of themes until today.
Circa 2006

2009 Present (WordPress)

I installed Thesis today and — quite honestly — its so scaleable that I will probably be sticking with it (even if it looks like I'm making changes) for the next few years. At least until this whole "blog" thing dies down. Heck… it's been 10 YEARS of blogging for me. Isn't that enough drivel?

Circa 2009

I'll say it again: I really am fond of that old animated CRT graphic from 2001. I gotta find a way to bring that back again soon.

170 Spoons


170 Spoons
Originally uploaded by orangejack.

If you're looking for a great new resource for tech tips and tutorials that are easy to understand, I think you should check out the new site by team Orangejack, 170 Spoons.

Not only are you going to learn some really cool things, but you're going to find some new ways of doing things online that's going to make your life easier.

And who doesn't want easier, right?! Right!

Check out 170 Spoons (because you'll be kicking yourself if you don't!)

Streaming at you like a… stream

I've implemented (for now) my Lifestream in the sidebar of my blog. The goal is to give you some (possibly unwanted) insight into my day.

I'm using the SimpleLife plugin for WordPress to grab my various RSS feeds and aggregate them into my Lifestream. It's a concept that nf0 introduced to me months and months ago, but it is just now being developed as a self-hosted plugin.

For now, my Lifestream will simply link to headlines from my blog, my flickr photos, what's playing on my iTunes via last.fm, my twitter posts, and my del.icio.us links, as well as random musings (which don't quite merit their own blog posts) on my Tumblog.

I will also be rolling my Lifestream into one tasty RSS feed – if you're so inclined.

Why? Well, it's pretty cool to play around with, for starters. I'm also thinking that it might come in pretty handy for a site redesign I have in mind later this year.

WordPress Category Feeds

I've added category feeds in addition to my main blog RSS feed.

If you're interested in doing the same, here's the code I used in my Sidebar template:

<?php wp_list_cats('sort_column=name&optioncount=1&feed=RSS&feed_image=icon_url'); ?>

The command shows the Category list alphabetically, along with the archive count, and an image link to the RSS feed. To do the same on your WordPress blog, replace the icon_url with the your own image URL (ex: http://www.this.com/that.gif). There's more template tags available in the WordPress Codex, so go nuts.

The resulting list looks like this:

So, if you like it when I'm geeky but could do without the football talk, there's probably a category feed or two of interest to you.