Developer’s Rhapsody

Is this the real code?
Is this thing testable?
Caught in an infinite loop
No ESC on my new MacBook
Open your IDEs
Look up in the docs and see
How this function works, it’s not very clear;
I’ve stack traced, xDebugged
var_dumped, returned, console logged.
Anyway the logic flows, doesn’t really make sense to me…
oh, it’s async.

Using WP-CLI on SiteGround cPanel Account

I recently moved my main site to SiteGround, which has been pretty nice so far. One of the little issues I’ve had has been the same as several other hosts: not using the latest version of WP-CLI on shared hosting accounts. It’s not unusual, and often not a major problem, but I recently came across an issue that prevents me from using the version installed on the server (0.18.0) with the version of WordPress I’m running on the site (4.4 trunk). Every time I tried to use certain wp commands, I was greeted with a fun new error message:

Fatal error: Cannot redeclare class WP_Http in /home/morganes/public_html/wp-includes/class-http.php on line 21

WordPress 4.4 is undergoing some massive file changes, specifically with separating classes, functions, and implementation code into their own files and using the original file to load them all for backwards compatibility. One of those changes caused an error with WP-CLI trying to redeclare WP_Http the class when it loaded it via require instead of require_once. That’s been fixed in 0.20.0, so I asked my host to upgrade to it.

Since I have shared hosting, an upgrade to the script would involve upgrading it for all users. That’s something that’s done on a schedule, and I don’t know when that’ll happen. SiteGround’s systems engineering team hasn’t upgraded yet, so they suggested installing a local version of wp-cli on my account and using it. I followed the Alternative Install Methods guide but kept running into a problem with the output and strange characters. After much trial-and-error, I found out that the shared WP-CLI script uses a different version of PHP than the regular command line does. Making a couple of changes to my .bash_profile finally got the latest version working.

Here’s the final version that’s working for me with WP-CLI v0.20.1 and WordPress 4.4-alpha. I’ve decided to use wpcli as my command for testing, so I can keep SiteGround’s version of wp to know when they’ve updated.

# WP-CLI from user account
export WP_CLI_PHP="/usr/local/php54/bin/php-cli"
alias wpcli="$WP_CLI_PHP $HOME/.wp-cli/wp-cli.phar --path=$HOME/public_html/"

Come Join the WordPress Community in OKC

Are you an advanced WordPress user? Core contributor? Theme and plugin developer?

Maybe you’re a blogger, or looking to start. Or maybe you just inherited a site and have no idea what to do with it.

Great! Come join us as we talk about all these things and more at the OKC WordPress Users Group!

OKC WordPress Users Group

Edmond, OK
562 WordPress Enthusiasts

Meet other local fans of WordPress, the Internet’s classiest and fastest dynamic content management system. Gather and discuss the best ways to work with your software.

Check out this Meetup Group →

Contributions to WordPress Core at All-Time High

Okay, let’s just get this out in the open: I don’t have any problem working in the background, but sometimes I like seeing my name in the credits.

I love the WordPress community, from blog writer to core developer. And I love giving back to the community: from answering questions at the OKC WordPress Users Group monthly meetup and in IRC to writing patches for core. I enjoy using WordPress to help folks communicate their message to the world, do business, or just keep family and friends updated on life.

The altruistic part of me loves seeing the fruits of my labor when someone is able to do something amazing with WordPress.

But that self-centered part of me loves seeing props morganestes as a Trac ticket is closed. It is a small reminder that I’m fighting Impostor Syndrome on a daily basis, and I see it as a blow landed against the fake me.

I’m excited about the release of WordPress 3.9 today for lots of reasons, but one that really stood out to me when I read the release blog post was this:

There are 267 contributors with props in this release, a new high.

That’s nearly 100 more than the last release! That’s 266 people around the world that I’ve been able to collaborate on a huge project that changes lives daily. That’s pretty cool in my book.

I’m excited to be a part of the Core Contributors group, and hope to continue the into 4.0 and beyond.

Even if it is to feel the slight rush of seeing my name in Trac. 🙂