WordPress Mobile Pack :: Installation

v1.1; James Pearce, dotMobi, and team; 15 July 2009
Copyright 2009, MTLD Top Level Domain Ltd

Contents

Quick guide

The pack is easy to install and will work immediately with the default settings. However, it is also very easy to configure it with your own preferences.

WordPress v2.7 and later

On WordPress v2.7 and later, the installation is as follows:

  1. Go to the 'Plugins' / 'Add new' menu
  2. Upload wordpress-mobile-pack.zip then press 'Install now'.
  3. Activate the switcher plugin. Change its settings as required.
  4. Select which desktop widgets are to appear on the mobile theme.
  5. Enjoy.

WordPress v2.6 and earlier

On WordPress v2.5 and v2.6, the installation is very slightly different:

  1. Locate your WordPress install on the file system
  2. Extract the contents of wordpress-mobile-pack.zip into wp-content/plugins
  3. Activate the switcher plugin. Change its settings as required.
  4. Select which desktop widgets are to appear on the mobile theme.
  5. Enjoy.

Make the cache writable

NB: the web server needs to have write-access to the image cache folder wp-content/plugins/wordpress-mobile-pack/plugins/wpmp_transcoder/c. If you have installed the plugin with WordPress 2.7, this should already be the case. Otherwise, or if you see errors when the plugin tries to resize images, you will need to set the permissions on that folder appropriately.

Ensure that the c flags are rwxrwxrwx, or whatever you choose in order to be web-server-writable:

      wordpress $> cd wp-content/plugins
        plugins $> cd wordpress-mobile-pack/plugins/wpmp_transcoder
wpmp_transcoder $> sudo chmod 777 c
wpmp_transcoder $> ls -al
-----------------------------------------------------------------
drwxrwxrwx  3 root  staff    102 20 Apr 10:08 c
-rwxrwxrwx  1 root  staff  13003 20 Apr 10:43 wpmp_transcoder.php

Make the themes directory writable

NB: the web server also needs to have write-access to the themes folder wp-content/themes, as it installs themes in that directory as part of the plugin activation.

If you have installed the plugin with WordPress 2.7, this may already be the case. Otherwise, or if you see errors when activating the plugin, you will need to set the permissions on that folder appropriately.

Ensure that the themes flags are rwxrwxrwx, or whatever you choose in order to be web-server-writable, using a similar technique to that above.

Comprehensive guide

A more comprehensive setup process and guide to configuration is as follows:

  1. Locate your WordPress install on the file system
  2. Extract the contents of wordpress-mobile-pack.zip into wp-content/plugins
  3. In wp-content/plugins you should now see a directory named wordpress-mobile-pack
  4. Ensure the wp-content/themes directory and wpmp_transcoder/c cache directory are web-server-writable, as described above.
  5. Login to the WordPress admin panel at http://yoursite.com/wp-admin
  6. Go to the 'Plugins' menu.
  7. You should see 'Mobile Switcher' in the list. If not, check steps 2 and 3.
  8. Click 'Activate' for that plugin.
  9. In wp-content/themes you should now see a selection of new directories including mobile_pack_base, mobile_pack_blue etc.
  10. Go to the 'Themes' page in the 'Design' menu (or 'Appearance' in WordPress v2.7)
  11. You should see a number of mobile themes in the list. If not, check steps 8 and the permissions on the theme directory.
    • NB do NOT select one of these themes. If you do so, even your desktop users will receive a mobile theme. The selected theme here should reflect what you want your desktop users to continue to see, and you'll configure the mobile theme choice separately in the switcher settings.
  12. Go to the 'Mobile Switcher' page in the 'Design' menu (or 'Appearance' in WordPress v2.7)
  13. Choose a switcher mode:
    1. 'Disabled' removes switching and all users receive the desktop theme
    2. 'Browser detection' means that the switcher will try to identify if your user has a mobile device
    3. 'Domain mapping' requires you to provide a different domain for your mobile users to access the site
    4. 'BOTH' (recommended) enables a combined algorithm that uses recognition and domain usage for the best user experience
  14. If you are using 'domain mapping' (or the combined approach), ensure all your relevant domains are resolving to this single WordPress installation. This may require you to configure your DNS and web server configurations.
  15. Choose the theme to be used for your mobile users.
  16. If you want to use browser detection, list the only algorithm currently available is user-agent prefix mapping.
  17. If you want to use domain mapping, list the desktop and mobile domains to be used for mapping. These all need to resolve to this installation.
  18. Users can choose whether to toggle between sites. Decide whether you want this link to appear in the theme footer. Alternatively, you can enable the 'Mobile Switcher Link' widget in the 'Widgets' admin menu.
  19. Go to the 'Widgets' menu and select which of the currently enabled desktop widgets you wish to have displaying on your mobile theme.
  20. Take a look at the other mobile admin settings and widgets available.
  21. You're all done!

Testing your installation

Ideally, use a real mobile device to access your (public) site address and check that the switching and theme work correctly.

You can also download a number of mobile emulators that can run on a desktop PC and simulate mobile devices.

If you use the Firefox Browser, the 'User-Agent Switcher' add-on can be configured to send mobile headers and crudely simulate a mobile device's request.

You can also use dotMobi's free on-line ready.mobi tool to test the compliance and mobile quality of your site.

Finally, you might consider DeviceAnywhere's web-based service that allows you to remotely test your site with hundreds of different models of handsets.

If you discover that your device is not being correctly served the mobile themes, please check the plugin and theme installations. Failing that, contact dotMobi with details of your device and site.

If you have a new or unusual device, and are happy editing PHP files, you may wish to add a new user-agent prefix to the list of those to be detected. You'll find these (4-letter) prefixes in the file wp-content/plugins/mobile_pack_switcher/lite_detection.php

Further Reading

This pack also comes with an overview guide and a readme of known issues.

There is an index to the included documentation