Use Autoptimize effectively

Keeping your WordPress website fast can become pretty tricky once you start installing plugins and off-the-shelf themes. Everything seems to want to load at least one CSS stylesheet, and sometimes a dozen or more JavaScript script files. Some also inject great chunks of CSS and JavaScript into every page. Luckily, there’s the handy Autoptimize plugin to help you sort all of that out. Continue reading Use Autoptimize effectively

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Tracking WordPress plugin compatibility with Trello

For a while now, I’ve been using the amazing Trello to help me keep track of various tasks. Sure, I use various bug trackers like Mantis and GitHub Issues too, but for some of the more high-level tasks it’s just easier with Trello. One job it’s particularly good at is helping me keep track of plugin compatibility testing. Continue reading Tracking WordPress plugin compatibility with Trello

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

eAccelerator and PHP closures don’t mix

I struck an odd problem recently with some code using closures. I use closures extensively for WordPress filter and action hooks when building custom plugins and themes for websites, and all usually works well on any version of PHP from 5.3 up. But I was finding that my closures weren’t being called on some PHP 5.4 websites. The problem was eAccelerator. Continue reading eAccelerator and PHP closures don’t mix

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Overview of building custom fields for Gravity Forms

Gravity Forms is a great way to build all sorts of forms in WordPress. It can be so simple that non-programmers can easily build their own basic forms. It’s also incredibly flexible so programmers can extend it in myriad ways, even by adding some complex custom fields of their own. But as usual, there’s a trade-off — ease of use for non-programmers means lots of hoops to jump for programmers. Here’s an overview of how I built some fairly complex compound fields for a custom application using Gravity Forms. Continue reading Overview of building custom fields for Gravity Forms

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Creating a custom gallery template for NextGEN Gallery

NextGEN Gallery is one of the easiest to use image gallery plugins for WordPress, so we now try to use it wherever a website needs to have user-managed sets of images: sliders/carousels, trade/media galleries, scenic galleries, you name it. We can do that easily because NextGEN allows you to create custom gallery templates. Continue reading Creating a custom gallery template for NextGEN Gallery

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Stop turning off CURLOPT_SSL_VERIFYPEER and fix your PHP config

As Pádraic Brady points out in a recent article about PHP security, there’s a whole lot of misinformation about how to deal with the error “SSL certificate problem, verify that the CA cert is OK” from curl. Nearly everyone advises that you turn CURLOPT_SSL_VERIFYPEER off (in fact, countless comments on the PHP manual page for curl_setopt tell you this). This is bad, because it allows your nice, encrypted stream of confidential data to be silently highjacked by a bad guy. Don’t do that! Instead, just fix your PHP installation so that it doesn’t get that error. Continue reading Stop turning off CURLOPT_SSL_VERIFYPEER and fix your PHP config

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Different thumbnail sizes for NextGEN Galleries

Ok, so we’re allowed to have one (1) size option for thumbnails in all galleries, and they can be either cropped square, or not. This is my only option?

But what if I want to have a gallery page of all of the lovely staff for my clients website, and their photos have been sensibly taken in portrait format, I do NOT want the thumbnails for this gallery to be cropped, that would be just wrong. And then there is to be a page with a photo gallery of the staff picnic where people have enjoyed taking happy snaps in both landscape AND portrait formats because that is what suits, so I need these thumbnails cropped. Continue reading Different thumbnail sizes for NextGEN Galleries

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail

Running QEMU with port redirection through libvirt

Like many developers these days, I use a bunch of different virtual machine images to give me access to multiple development and test environments without having a room full of computers. My VM of choice is QEMU KVM, the kernel-based virtual machine bundled with Fedora. I’ve always used simple shell scripts to start my VMs, which has allowed me great flexibility, but yesterday I set one up using the nice Virtual Machine Manager (VMM) GUI application. And remembered why I wasn’t using it: there’s no way to tell it how to do TCP port redirection! But now, there is a way… Continue reading Running QEMU with port redirection through libvirt

Facebooktwittergoogle_plusredditlinkedinmailFacebooktwittergoogle_plusredditlinkedinmail