Archive for the 'WordPress' Category

Developing WordPress Mobile Themes

Wednesday, March 16th, 2011

Here at OpenPlans, we decided we wanted to upgrade our mobile presence for a few of our blogs.  The number of smartphones that were shipped in the fourth quarter of 2010 exceeded the number of personal computers shipped, so we see our mobile presence becoming increasingly important.

Choosing a Mobile Plugin

The GothamSchools mobile theme shown in the Firefox browser.

The first step was to survey the various mobile plugins for WordPress.  I narrowed down the choices to WPTouch and WP Mobile Pack.  I ended up choosing WPTouch because it is compatible with the Disqus commenting system.  We recently launched Disqus on GothamSchools and plan on doing so soon on our other blogs.

The advantages WPTouch offers over our previous mobile theme, are:

  • it has a menu that gives access to all parts of the site and search
  • it has share buttons that will increase the viral nature of blog posts
  • it reformats images, videos etc. on the fly to be compatible with the specific mobile device
  • it has wizzy AJAX features, like auto-loading of more posts in the post listing
  • it is under active development and has a large community so is a good bet for future releases and ongoing support
  • it is compatible with wp-super-cache

I decided to buy the WPTouch Pro version of WPTouch instead of using the free version.  The Pro version is quite a bit more sophisticated than the free version and promises future upgrades and support.

Customizing the Mobile Theme

I then set out to customize the default WPTouch theme for  I created a child theme of the default WPTouch theme in which I added some styles and slightly changed the markup in the index and archive templates.  Many other settings were easily customized using the WPTouch admin panel.  Because I made only a few changes to the template code, the new Gotham mobile theme will hopefully remain compatible with future upgrades to the WPTouch Pro plugin and its default theme. (more…)

New NACTO Site Released

Wednesday, March 9th, 2011

Over the past six months, Andy and I have been working with members of National Association of City Transportation Officials (NACTO), Alta Planning, and others to develop a new site for NACTO which includes an Urban Bikeway Design Guide.  The design guide summarizes the latest developments in bicycle infrastructure and should serve as the canonical resource in the country.

This morning, Evan, Andy and I deployed the site.  Shortly after, the NYC DOT Commissioner, Janette Sadik-Khan, announced it at the opening plenary of the National Bike Summit.

Press releases have gone out, tweets have been made and people are blogging about it.  To learn more about the site, see Streetsblog’s writeup.  The site has seen over 1000 visitors so far today.

WordPress Performance Testing, part 2

Monday, February 21st, 2011

Evan and I followed up our last round of performance testing with another set of tests to see how apache compares with lighttpd on a more powerful server.  The previous round of performance tests were done on a server with only 4GB RAM and we found that apache filled up all the RAM when hit with 100 or more concurrent connections.  We were curious to see if when we increased the RAM, apache would perform better.

We ran these tests on a 20gb RAM, 40gb hd, ubuntu 10.4 server, shared 16 xeon 2.4GHz machine.  We did find apache coping much better with 100 concurrent connections.  When we scaled up the load to 500 concurrent connections, however, apache ran into problems and crashed while lighttpd really started to fly.  Even 1000 concurrent connections didn’t post any problems for lighttpd.  Here are the test results.


It is okay to use apache if you are expecting small server loads, but if you expect that you might get dug or have other sources of high traffic spikes, you’d be best spending the time to configure a high-performance web server like lighttpd or nginx.

WordPress, Web Servers, and Cacheing Plugin Testing

Monday, February 7th, 2011

We run several high-traffic WordPress blogs on a lighttpd web server.  Combined, they get about 150,000 unique visitors per month.  We originally moved from an apache web server to lighttpd, because lighttpd can handle a much larger traffic load with the same server resources.

The problem with using lighttpd is that it is not very common for people to run WordPress on this web server.  Certain cacheing and mobile plugins need to alter the configuration of the web server.  Setup and debugging information almost always assumes an apache web server.  So in each case, we had to figure out a way to configure them for lighttpd.  When plugins get upgraded or go obsolete, we again have to find ways to get new plugins to work with lighttpd.  Over time, when we run into problems with our sites, we can’t rely on help being available on the web but have to figure it out ourselves.  Right now, for instance, we are noticing we have a memory leak somewhere which causes lighttpd to eventually fill up all available RAM and crash.

For this reason, we decided to do some performance testing on lighttpd vs. apache, as we were considering possibly going back to using apache.  While we were at it, we also decided to compare our current cacheing plugin, wp-super-cache and another leading plugin, w3-total-cache. (more…)

Civic Media Tech 2011

Thursday, January 20th, 2011

We have several high traffic blogs in the Civic Media department of OpenPlans:

Over the past while, the technology and design of the blogs have become somewhat outdated, we have tolerated some technical performance problems, yet still their readership continues to grow.  During 2011, I plan on improving these things in the hopes that doing so will foster continued community growth in both quantitative and qualitative ways.

The Plan for 2011

Here are the things I would like to do, in this order: (more…)

Browser Cacheing

Friday, November 27th, 2009

The Problem

If you go to a post on, type in a beautifully written comment, fill in the rest of the fields including 5+7 is, um, 13 and hit “Post”, you get “Error: You have entered the wrong sum in the spam protection field…”  Damn!  So you hit Back and go to correct your error only to find that your comment is gone and you’ll have to type it all over again.  Sucks! (more…)

Top Post from Category v.0.3 Plugin released

Wednesday, March 11th, 2009

Today I released a new version of the Top Post from Category plugin, v.0.3.  This widget is now a multi-widget, that is, it is built to allow multiple instances of itself on a single sidebar, each serving the top post of a different category.  This feature had been requested a few times by people including the bloggers at GothamSchools.  I figured out how to do this by using the example at the bottom of the wp-includes/widgets.php file.

The other thing I added is a drop-down listing of categories for the admin ui.  This saves people having to lookup their category id themselves.

Please go here for more information, to ask questions and to comment on this plugin.

Top Post from Category v.0.2 Plugin released

Wednesday, January 14th, 2009

This release removes the dependency on the excerpt reloaded plugin and fixes the “more” tag which used to disappear when you overrode the excerpt.  For more information and to leave comments, go here.

Top Post from Category v.0.1 Plugin released

Thursday, January 8th, 2009

Today I uploaded v.0.1 of the “top post from category” WordPress plugin to  Read more information about the plugin and leave comments here.