Moving at the Speed of Creativity by Wesley Fryer

Configuring WordPress for Mobile Theme Compatibility with WP-Super Cache

For at least six months I’ve used the WordPress Mobile Edition plug-in to provide visitors to my WordPress blog, who use a mobile device like an iPhone, iPod Touch, or Blackberry, with a quick-loading mobile interface. This plug-in is a bit unusual, since it also requires a custom theme which must be uploaded into your wp-content/themes directory. The main problem with the plug-in, however, is that it is not compatible with “caching” plug-ins like wp-cache, which I’ve used now for several years. Caching plug-ins are beneficial for busy WordPress blogs because they create static versions of webpages and thereby reduce the mySQL server request load for your web host. This can increase the speed / performance of your WordPress blog for visitors, and in the extreme (a situation which has NOT happened to me, to date) can make your blog “DIGG proof.” This means if a post gets popular on a site like DIGG, Slashdot or reddit (which means your page/site is attracting thousands of hits) the server should be able to handle the load and not fail. When a mobile-theme plug-in is not cache-compatibile, sometimes mobile visitors are shown the “mobile version” of webpages, and sometimes they are not, depending on whether or not the full-browser version of the page has been previously cached. This defeats the purpose of using a mobile-accessible plug-in or theme, so it’s important to work around these issues.

I’m not sure the first time I saw it, but I’ve had “mobile-blog theme envy” ever since I first saw the WPtouch WordPress plug-in / mobile theme in action on my iPhone. James Deaton runs it on his blog, Wandering Tech, and every time I’ve seen it in mobile form the past few months I’ve wanted to use it too. Like all the plug-ins and themes I use on my WordPress blog, WPtouch is free… so not running it wasn’t a question of money, it was a question of time. I tried awhile back to activate it on my blog, but it was not compatible with wp-cache either. So, to get it to work I knew I’d have to do some research and tweaking. This evening, I decided to give it a try.

I found the following video tutorial online, which explains how to configure the WP Super Cache plug-in for WordPress to work with WPtouch.

This process required the following steps: I deleted my old wp-cache cached pages, deactivated the wp-cache plug-in along with WordPress Mobile Edition, deleted both of them from my hosting account (with Cyberduck), as well as the previously required Carrington Mobile WordPress theme, and then downloaded WP Super Cache. After uploading and activating it, I followed the instructions in the above video to configure it for WPtouch plug-in compatibility. To add information about Creative Commons licensing at the bottom of the mobile theme, I had to edit the “footer.php” file located in the wptouch / themes / default directory.

Whew! This took awhile, but it was worth it. I’m delighted with the results!

My blog running the WPtouch plug-in

I spent some time customizing the mobile version’s background, colors and fonts, as well as the WordPress “pages” which are displayed in the mobile menu. I like how WPtouch permits custom icon configuration for WordPress pages as well.

My blog menu running the WPtouch plug-in

I was interested to see the WPtouch categories menu button displays post categories in descending order by the number of posts in each.

My blog categories running the WPtouch plug-in

By clicking on the “podcasts” category, my month of “podfading” (a term I heard from Dan Schmidt back in 2006) in December is revealed! I hope to post podcasts at least once every two weeks in 2010, so hopefully lapses like this won’t be common. K-12 Online took a lot of my time in December, so that’s my excuse and I’m sticking to it!

My blog's "podcast" category running the WPtouch plug-in

Mobile web access is going to continue growing by leaps and bounds in the years ahead. Are your organizational and personal websites mobile-friendly? If you’re running WordPress, WPtouch provides a clean, effective and free way to provide mobile accessibility.

I updated my WordPress plug-in colophon on my about page, reflecting the changes to plug-ins I made tonight.

Technorati Tags:
, , , , , , , , , , , ,

If you enjoyed this post and found it useful, subscribe to Wes’ free newsletter. Check out Wes’ video tutorial library, “Playing with Media.” Information about more ways to learn with Dr. Wesley Fryer are available on wesfryer.com/after.

On this day..


Posted

in

, ,

by

Tags:

Comments

One response to “Configuring WordPress for Mobile Theme Compatibility with WP-Super Cache”

  1. Ben Wildeboer Avatar

    Thanks for sharing! I just installed WPtouch & it looks great and was super easy to configure.