Installing Tera-WURFL

WURFL (=Wireless Universal Resource File) is an XML configuration file which contains information about capabilities and features of almost all wireless devices in the world. Many people have contributed to this project but the core team consists of Andrea Trasatti and Luca Passani. WURFL can be used for free in any application.

More information can be found at:

rss feed

Quick guides

Installing Tera-WURFL

The Tera-WURFL can be downloaded from:

Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Apache 2.0 or higher.
MySQL 3.23.55 or higher.
PHP 4.3.3 or higher or PHP 5.

  1. Create the following directory on the webserver docroot:

  2. Download and unzip into <docroot>/tera_wurfl

  3. Download and unzip into <docroot>/tera_wurfl/data.
    The data directory should contain the wurfl.xml file.

  4. Download the web_browsers_patch.xml and move it into <docroot>/tera_wurfl/data

  5. Download and unzip and move it into <docroot>/tera_wurfl/device_pix
    This file can de downloaded from:

  6. Edit file <docroot>/tera_wurfl/tera_wurfl_config.php.
    • Modify the following lines into:
      define("WURFL_PATCH_ENABLE", false);
      define("WURFL_PATCH_FILE", DATADIR.'web_browsers_patch.xml');

  7. Open a browser and enter the following url:

    You should something like:

    Tera-WURFL admin

  8. Click the link "Update database from local file"

    You should something like:

    Tera-WURFL database

  9. Edit file <docroot>/tera_wurfl/tera_wurfl_config.php.
    • Modify the following line into:
      define("WURFL_PATCH_ENABLE", true);

  10. Go to
    and click link "Update PATCH database from your local patch file"

    You should something like:

    Tera-WURFL database update

  11. To check if the installation is successfull, go to
    and click link "Tera-WURFL test script"

    You should something like:

    Tera-WURFL check

    In the textbox "Mobile device user agent", you can enter the user agent, for example SonyEricssonF500i, and it will find all information about this device.
    See wurfl.xml: <device user_agent="SonyEricssonF500i" ...>

  12. The script tera_wurfl_updatedb.php creates three tables:

    Tera-WURFL database model

    The device table holds the data from the WURFL file and it is loaded into this table first. The data in this table is never modified, and if patching is disabled, this table is queried for the device in question.

    The patch table holds the data from the patch file, much like the device table, this data is not modified unless a new patch is loaded. When patching is enabled, this data is merged with the device table to create the hybrid table.

    The hybrid table is a combination of the device table and the patch table. If you have patching enabled, this table is queried for the device in question.

  13. Password protect directory <docroot>/tera_wurfl, see tutorial:
    Using Apache .htaccess file, password protecting directories