Mobile-Friendly Blogging with WordPress

Update: dotMobi has released an awesome new mobile pack. Get it here!. So you want your blog to reach as many people as possible, or you want people to be able to access and comment on your postings anytime, anywhere, then WordPress, coupled with the mobile extension is the tool for you.


WordPress

WordPress (http://wordpress.org/) is a very popular Open Source blogging tool. Its popularity is due in part to its ease of use, part to its excellent functionality, and in part due to its Open source status. It is PHP based, and is very easy to install. WordPress is not natively mobile friendly, but with the help of a handy mobile plugin described below, it can be optimised for mobile devices. By installing this mobile extension your wordpress blog becomes mobile friendly, and all your previous blog postings become immediately mobile-accessible with a minimum effort on your part.

In this tutorial we assume WordPress has already been installed. By installing the WordPress Mobile Plugin your WordPress installation becomes instantly mobile friendly. That is, all your previous postings are immediately accessible by mobile devices. In addition, your blog will also conform to the dotMobi compliance guidelines.

WordPress Mobile Plugin

The WordPress mobile plugin used here was originally written by Alex King [http://alexking.org]. It offers reading and commenting functionality for mobile devices. We have modified the plugin in a number of ways:

  • The plugin has been modified to use the WURFL device repository for switching between mobile and desktop versions
  • WordPress will now send XHTML MP as default for unknown user-agents, in compliance with dotMobi style guides
  • The markup outputted by the mobile edition has been cleaned up so that it is now well-formed XHTML Mobile Profile

Installing the Plugin

The first thing to do is download the plugin package from here. Included in this archive are the WURFL files, and the plugin files. Unpack the archive in your WordPress plugins directory ([WORDPRESS_ROOT]/wp-content/plugins/). This will create a new directory wp-mobile-wurfl, and two files: wp-mobile.php, and wp-mobile.css. Move the two files (wp-mobile.php, and wp-mobile.css) to the [WORDPRESS_ROOT] folder in your web directory.

Next, you need to log into WordPress and click on "Plugins" in the top menu. On the next page locate "WordPress Mobile Plugin with WURFL" in the list, and click on the "Activate" link on the right hand side of the screen (see illustration).

Activate plugin

The final step is to update the WURFL cache. This is necessary to speed up access to the WURFL data. After installing the plugin, there is a new panel in the Options menu of the WordPress admin area. So to update the WURFL cache, you navigate to the Options->Mobile Plugin panel in the admin area. There is a single checkbox in this panel. Check the box, and the click the Update Options button. When this process is complete (it may take a few moments), you are done!

Update WURFL cache

Going mobile with WordPress

So now all the hard work is done, happy blogging.

Special thanks to Alex King (http://alexking.org) for creating the original plugin.

Ruadhan O'Donoghue
UPDATE: A number of users have reported that this plugin damages their search engine rankings by defaulting to delivering mobile content to the search engine bots. Please bear this in mind before installing the plugin.

Exclusive tips, how-tos, news and comment

Receive monthly updates on the world of mobile dev.

Other Products

Market leading device intelligence for the web, app and MNO ecosystems
DeviceAtlas - Device Intelligence

Real-time identification of fraudulent and misrepresented traffic
DeviceAssure - Device Verification

A free tool for developers, designers and marketers to test website performance
mobiReady - Evaluate your websites’ mobile readiness

© 2024 DeviceAtlas Limited. All rights reserved.

This is a website of DeviceAtlas Limited, a private company limited by shares, incorporated and registered in the Republic of Ireland with registered number 398040 and registered office at 6th Floor, 2 Grand Canal Square, Dublin 2, Ireland