making bbPress (and WordPress) work better!


How to build HHVM 3.22 master trunk on CentOS 7

HHVM 3.20, 3.21 and 3.22 are still faster than PHP 7.2 especially with many connections under load, however as of October 2017 there still are no official pre-compiled HHVM packages for CentOS 7.x so we need to revisit how to build it by hand, which is not too difficult, just takes most servers awhile to assemble

There are instructions on the HHVM wiki for CentOS7 but they are a year out of date now.

The process is straightforward, first we need to not only make sure we have all the libraries we need but also the development libraries and most recently a newer version of the GCC compiler, we will use GCC 6.3 found in the official SCL Devtoolset-6 for CentOS 7 (trusted because it is built by Redhat/CentOS)


Nginx 1.9.5 brings built-in HTTP/2.0 support, replaces SPDY

Nginx 1.9.5 will ship this month shipped 9/22 with new HTTP/2.0 support:

It replaces the SPDY module since they cannot be both active at the same time. HTTP/2.0 spec was finalized May 14th 2015 so it can now be implemented and standardized.

HTTP/2.0 features only work over HTTPS (tls/ssl) connections in most browsers which is unfortunate since virtually all WordPress based websites could benefit from the speedup.

There is a catch in that your server must use OpenSSL 1.0.2 or newer (or be backported with ALPN support ala Redhat)

Nginx must be compiled with

./configure --with-http_v2_module (etc.)

and then in your Server {} block replace spdy with http2

server {
    listen 443 ssl http2;

This demo claims to demonstrate how HTTP/2.0 is faster for many small elements on a page:

Firefox 36+, Chrome 40+ and IE11 (on Windows 10) currently support HTTP/2.0 over TLS

Everyone can make their website HTTPS for free

In case you have not heard the amazing news, Mozilla, EFF, Automattic and a few other folks are banding together to help end the SSL certificate cartel by the end of 2015

This is huge. Everyone will be able to make their website HTTPS for free, without paying an annual fee and much easier than StartSSL


CentOS 6.4 update finally supports IW10 for tcp/ip tuning

iw10Google and others have published several whitepapers showing benchmarks where tuning tcp/ip on servers can really help web browsing performance.

One of these important tweaks is known as IW10 which improves the tcp/ip congestion window by reducing ACKs (initally sending 10 packets instead of only 3) and is enabled by increasing initcwnd and initrwnd.

Unfortunately those on CentOS (one of the most popular linux production distributions) were not able to take advantage of this – until this weekend when CentOS 6.4 was shipped.

CentOS 6.3 could change initcwnd but NOT initrwnd (RWIN) which requires a kernel > 2.6.33

CentOS 6.4 is 2.6.32-358.0.1.el6 (Red Hat 4.4.7-3) so the feature has been backported

Here’s how to take advantage of IW10 on CentOS 6.4


Nginx 1.2.7 released

A new version of Nginx stable branch has appeared today with a rather long changelog:


When building manually, remember to update pcre, currently at 8.32

Google Chrome Browser launches

Go try it: (direct download)

If anyone is interested in the 90 minute video presentation of it they did today, it’s over here, otherwise go read the comic book all about it.

It seems pretty good, fast but not very smooth on some dhtml actions I use on some pages.

However there is no plugin interface for it (like Firefox extensions) so that is going to limit adoption.

PngOptimizer makes smaller PNG than PngOut

Many designers/developers have discovered and used PNGOUT for awhile now to make smaller (sometimes significantly smaller) PNG files with better compression. I recently discovered another GPL program, PngOptimizer that makes even smaller files in many cases, especially for PNG8 files (256 colors with transparency, similar to GIF but better in some cases and IE supports it).

Flash Stand-Alone Installer for Internet Explorer

Ever since Adobe took over Macromedia’s Flash products, they have slowly converted everything into their corporate style, making the software big and bulky and taking away the “stand-alone” installer for Internet Explorer that you could put on a CD or flash drive and take with you so you don’t need an internet connection to install it.

The Firefox version has to be stand-alone since it’s a plugin and they can’t execute code from Firefox, but the IE version insists on installing itself from the web via active-x, which I don’t allow on my network since it’s incredibly dangerous and mostly just used for annoyances like ads.

But I stumbled across this little gem buried halfway in this page: (more…)

Finally upgrading to Windows XP

I’ve gotten seven years out of Windows 2000, and I could use it for a few more I am certain, but software vendors are forcing me to finally upgrade. There’s been a slow but steadily growing list of applications that refuse to install on Win2k, no matter how I try to trick them or manually unpack and run. The “won’t run on win2k” reasons have eluded me, but some research over the past year leads me to believe it has to do with some of the subtle new native features in the XP API like compression for undo features and other stuff that’s beyond my grasp. (more…)

Movabletype tries to (hilariously) solicit WP 2.5 upgraders

This really upset me because he thinks he’s being so clever:

I’ve got nothing personally against Anil, but definitely something against the company:

Dear Anil Dash,

Movabletype completely screwed over tens of thousands (if not hundreds of thousands) of dedicated bloggers who put hundreds of hours into customizing their Movabletype install after your company’s “first free, but now pay” fiasco (version 2.6 to 3). And now you solicit people to switch to Movabletype again because you finally saw the open source light a few months ago? Nice try. Fool me once…

Also, Movabletype didn’t start off generating static files because of some kind of clever performance design – it did it because of the incredibly slow, hard to scale Perl code demanded such a solution to remain viable. It’s scary you are still using the same solution after so many years of development and chances to fix it.

You should have kept LiveJournal, at least the creative folks commonly found on there are far more valuable than the crowds you find on other sites like MySpace, etc. But you sold off possibly the most valuable asset you had.

WordPress has it’s faults but you most definitely should not be throwing stones.

how to fix Safari for Windows crash on startup launch

It took me a little while to figure this out – uninstalling it and deleting settings and reinstall did not solve the Safari crash on start-up.

So I noticed in the readme.txt it says that it will use the plugins from the firefox plugin folder – so I started to guess there was a plugin there it didn’t like. So I renamed \firefox\plugins to \firefox\plugins.bad temporarily.

Then Safari worked!

So I changed the home page to blank on Safari, closed it, renamed the firefox plugins folder back, and now both safari and firefox will start just fine.

ps. the newest safari for windows is hidden at
You have to go through the menus to get it. But it still doesn’t fix this problem until you disable the plugin folder temporarily

List WordPress post titles, etc. outside of WordPress

There are probably many mentions of how to do this around the web and forums, but I couldn’t quickly find any code samples so I came up with my own by hacking the RSS templates. Using this snippet you can list post titles, even exceprts or comments outside of WordPress on your website without having to go through the web interface.

It’s as simple as creating a new PHP file. ie. newest.php in your wordpress root (topmost folder) and then including it in any other file on your website that is outside of wordpress with:

<? @include ($_SERVER['DOCUMENT_ROOT'].'/wordpress/newest.php'); ?>

Here’s the code for “newest.php”

<?php $limit=6; $more=1; $count=1;

if (empty($wp)) {require_once('wp-config.php'); wp('feed=rss');}

if ($posts) { foreach ($posts as $post) { start_wp(); ?>

<a href="<?php permalink_single_rss() ?>" /><?php the_title_rss() ?></a><br>

<?php $count++; if ($count > $limit) { break; } } } ?>

That will list the latest post titles, up to limit you set (I chose 6).
It’s easy to add excerpts, etc to that code if you study the rss & rss comments templates.

quit it with the darn AJAX !

The AJAX fad is driving me crazy. It reminds me of how people went overboard with frames when it came out and then a year or two later there was the awakening to get rid of all frame use. It’s going to happen with AJAX too, mark my words, because with non-integrated plugins the AJAX bloat becomes insane. Twenty external javascripts and a dozen external stylesheets will make your website CRAWL and overload your server.

The idea behind AJAX is that some people mistakenly think that visitors spend so much time on a webpage, the webpage should self update parts of it without refreshing or changing in any other way. Instead it’s the other way around, people spend brief amounts on a webpage and move to another either out of boredom or they didn’t find what they wanted, or they did find what they wanted and are done with it.

AJAX is meant for heavy-duty webapps like google maps that NEED updating without moving away from the page. Regular browsing doesn’t need AJAX at ALL and it should be avoided in the form that it’s being commonly used these days.

I found a great list of common problems with typical AJAX programming:
Alex Bosworth’s list of “Ajax Mistakes”
There is also a wiki version you can add to
All of these ARE indeed quite common, annoying and great reasons not to bother bloating your next plugin/website with it.

I’ll add two more to his list (but with the point of why NOT to use AJAX at all):
1. AJAX results (usually) CAN’T BE BOOKMARKED to sent to friends or shared otherwise
this is a top complaint with Flash, why make your webpages just as broken?

2. alot of novice users browse with Javascript completely turned off, enforced by some weird advice they get everytime they read about some kind of virus or other security issue (when was the last time you checked how your website functioned with javascript turned off) AJAX will NOT work at all when javascript is turned off – so your fancy setup is dead in the water.


super easy dual Internet Explorer 7.0 + 6.0 setup

I’ve known about Jon Galloway’s IE7 standalone scripts for awhile now but I just discovered there is a super easy IE7 install program now available from Tredosoft that does all the work, makes all the shortcuts for you etc, if you can’t be bothered with the technical details of running standalone.

I could care less about IE7 but since a great number of people will automatically use it out of laziness I figure I better check all my websites with it.

some goodies if you missed Wordcamp 2006

I wasn’t able to attend Wordcamp 2006 because basically I won’t be going anywhere near an airport for the next decade 😦 so I’ve been looking for any goodies on it…

I just noticed today that Matt Mullenweg‘s keynote address for WordPress 2006 is up on Google video!
Yay! Thank you to whomever posted that. He looks and sounds like he is 16! 😮 I feel sooo old.

Mark Jaquith has also promised to post some audio recordings. I hope he recorded his talk about WordPress performance as I am looking forward to hearing it.

Other places to see/read what happened so you don’t feel so left out include:

WordPress 2.0 & 2.1a is *still* using Atom 0.3

Although it was slated for WP 1.6, WordPress still is using the deprecated Atom 0.3 output.
Time to update atom xml to 1.0 ! Find the fix instructions here:

(the original php5 fix is here but I figure most people are still using php4)

I also just found this in trac, Atom 1.0 template from July 2005 and
someone posted an Atom 1.0 comments template back in October 2005.

I discovered the PHP4 fix was not quite complete so I had to do a few minor tweaks.

Here are the two templates I edited, zipped up for the lazy or non-programmers.


Better 404 error page behavior for WordPress

After wasting an hour trying to debug a problem I was having with WordPress I discovered I had actually fixed it within the first minute – it was just that my browser was obeying the caching behavior set by WordPress for the 404 page! After a hard-refresh I found that the error was gone and it was working properly.

So I desided to improve the WordPress 404 behavior.
You can do it too, add this to the very top of your header.php template


$_SERVER[‘REQUEST_URI’] doesn’t always work correctly! Here’s how to fix it.

Here’s something important for WP plugin developers that I have discovered on my server with wordpress and many plugins.

While PHP programmers have been taught to use
to fetch the current page URI, IT DOESN’T WORK CORRECTLY in all cases with wordpress’s rewrite functions.

I discovered this while working with the paged-comments plugin. It caused the template and other plugins to not see the proper URI and miss out on the extra stub in the URL.

After some studying of phpinfo results, I discovered that the proper, complete URI was shown in:

Yes, I know they should be identical but apparently it’s an Apache + PHP bug in some environments.

My server has apache 1.33 and php 4.2 so your milage may vary on the bug.
But since ALOT of people have that server combo, trust me, this prevents problems.

How to “de-ajax” WP-Polls 2.11 & 2.12

WP-Polls is a great voting plugin for WordPress but after version 2.06b Lester decided to use ajax (only).

While ajax is the latest buzzword, ajax is not very handy if you want bookmarkable pages and despite what people are led to believe, it actually can put *more* load on the server. It also makes certain kinds of tracking difficult (or impossible). Worse yet, if visitors have javascript disabled, it won’t work at all. So if it’s not critical, I don’t like to use ajax.

While you can just use 2.06b if you don’t want ajax, the problem is he added some nice little features after that version (like tracking votes by member instead of IP) which you may want.

The good news is it’s not hard at all to make it non-ajax. I hope to release a mod of 2.12 at some point (if he doesn’t do it first) that lets you toggle between ajax and non-ajax with a simple admin menu choice, but for now here are the steps to undo the ajax features manually and make it static, exactly like 2.06b


WP-Polls using CSS instead of images

Among Lester Chan‘s great WordPress plugins is “WP-Polls“. His newest version uses ajax which I don’t care for but he has a slightly older version without it.

(here’s an alternate download location for WP-Polls while Lester’s site is down)

Both versions however require three small images for the little result graphs. The problem with this is that no matter how small the images are, the visitors’ browsers will have to do three more calls to the server to load them and even on broadband, that slows things down. However because he wisely uses templates to control how the poll results are seen, it’s easy to change the images to CSS.

Here’s how to do it:


Captcha without cookies or sessions

One problem I have had with adding captcha to my blogs is that virtually all of the plugins available require sessions to track the “magic code” via a cookie on the server side. Well this creates a big problem because many visitors turn off cookies by default for sites they are not familiar with which will make the post fail, then they have to hit the back button and because sessions are active, most browers will see it as an expired page so it empties out the comment form! That’s very fustrating and I have experienced myself on many blogs where I gave up commenting entirely because it was too annoying.

Well I finally found a decent WordPress captcha plugin I could modify easily enough. “Anti Spam Image” by Nio can be found over here:

My version uses MySQL instead of sessions to keep the code available for 30 minutes to the visitor. I’ve posted my modification at the bottom of his comments or you can get it here:
(backup download location:

Zempt for posting

I am relieved to see that Zempt not only (still) works with WordPress, but it works with the shared online version here.

I love Zempt, super-lightweight and fast and it sits in the system quick tray, waiting so nicely.

Zempt was originally designed for movabletype years ago and has not been updated for awhile. One problem is it won’t edit WP “pages” (not posts).

But there is hope on the horizon as someone is taking over the open source project and promises to release something soon…

read more at Zempt not dead yet

jumping into the shallow end…

I figured I’d create one of the free blogs here on wordpress since I am becoming a big fan and it’s good to have a place people can reach me when I leave them comments on their blog.

If you are at all curious, the _ck_ nickname comes from an old (very old) IRC handle I used to use.

The good thing about this account is I can get a reference of what a standard wordpress install looks and feels like since I tend to modify the heck out of mine.