List your MySQL Tables According to Size or Row Count

If you’ve ever been debugging a large Multisite installation that’s having MySQL memory issues you know how maddening it can be. Sometimes you can turn on slow logging and find the source of the issue. But sometimes it’s not just about slow queries, it’s about the shear size of the tables and the number of [...]

Regex to Match Opening Slash

Just in case anyone needs a regex that tells you that a string does NOT have an slash at the beginning, here you go. This is useful for handling paths defined by users and you want to check whether it is a relative or absolute path. preg_match(“#^(?!\/).*#”, $string);

Giving WooCommerce a Try

Just a quick announcement. I’m now using WooCommerce for my eCommerce so please let me know if you have an issue. I was using Cart66 but it makes use of sessions, which are disallowed by WPEngine for both security and performance reasons. my WooCommerce setup looks ugly at the moment because I haven’t had time [...]

Simplr Registration Form Plus v2.1.9

Simplr Registration Form Plus I just pushed Simplr Registration Form Plus 2.1.9 … lots of behind the scenes updates and code fixes. Primary visual enhance is the UI for the TinyMCE shortcode button. You know longer have to type in the custom fields. You can know just check the boxes then drag and drop to [...]

Function: get_template_part_cached()

In my WordCamp Chicago presentation I had an bunk version of this function. Here’s a better version. Though we could probably still improve even this: function get_template_part_cached($slug, $name, $key, $group = ‘posts’, $ttl = 3600) { if( !$output = wp_cache_get($key, $group)) { ob_start(); get_template_part($slug,$name); $output = ob_get_contents(); ob_end_clean(); wp_cache_set( $key, $output, $group, $ttl ); } [...]

Slide Deck From WordCamp Chicago

Thanks everyone for coming to my presentation at WordCamp Chicago. The organizers did a great job putting everything together. Here’s my slide deck. WordCamp Chicago Slides

Thesis Cache(r) Beta – 2012-07-31

Through my work at WPEngine I’ve found that using the Thesis Theme can occasionally lead to some performance issues on higher-traffic sites. Nothing spectacular, there are a ton of themes out there that have some issues scaling. Thesis is not special. But what occurred to me about Thesis, is that it really should be one of the [...]

A Wee Bit of Downtime

Sorry folks, we had a wee bit of down last night due t0 my own stupidity but now we’re back up and running. Back to working too much and blogging to little. As most of you know I’ve taken a position at WPEngine and they’re working me like mad, but I’m learning all sorts of new [...]

Hiking in Annadel State Park

WordPress Hack: Reorder the Admin Menu

For many small business clients pages wind up being the most important WordPress post type. Many of them don’t even want a blog, just a nice looking site where they can update the content periodically, i.e. the contact page, the services page etc. So for these clients it’s often a little confusing to have “Posts” [...]