Installation
Last updated on
30 April 2025
Steps for installing the location module:
- Extract the location module tar.gz or zip and copy the directory to your sites/all/modules or sites/SITENAME/modules directory, whichever is relevant for your drupal install.
- Enable the Location module Administer >> Site building >> Modules (admin/build/modules).
You will also need one or more of the following modules to get usable location functionalities:- Node locations: Allows nodes to have locations. Node locations have views support.
Note: Node locations and CCK locations cannot be used on the same node type. See the known issues for more information. - User locations: Allows users to have locations. User locations have views support.
- Location CCK: Provides a CCK field type for locations. CCK locations have views support.
Note: Node locations and CCK locations cannot be used on the same node type. See the known issues for more information. - Location taxonomy: Allows taxonomy terms to have locations.
- Location phone: Adds a phone number field to locations
- Location fax: Adds a fax number field to locations
- Location add another: Allows adding locations to nodes without having to edit the node. It adds a collapsed location fieldset to node view pages that can be used to add new locations.
- Node locations: Allows nodes to have locations. Node locations have views support.
- Set user permissions.
- Configure location settings.
-
(optional) If you want to use postal code proximity searching (via the Location Search module or though Views) you will need to import the postal code data into your website's database. These can be found in the "databases" sub-directory of the location module directory. The files are in the format of zipcodes.CC.mysql, where CC is a two-letter country code such as 'us' or 'de'.
The files can be imported using a tool such as phpMyAdmin or MySQL Workbench, or from the command line:
cd sites/SITENAME/modules/location mysql -u username -p database-name < database/zipcodes.CC.mysqlOr if you have Drush installed:
cd sites/SITENAME/modules/location drush sql-cli < database/zipcodes.CC.mysqlNotes:
- If your site is using table prefixes, you will need to adjust for this manually, by opening the file in a text editor and replacing 'zipcodes' with 'prefix_zipcodes' throughout.
- If you require support for a country that doesn't have a file in the "databases" directory you will need a database dump of postal code data for that country. A database dump for most countries postal codes can be downloaded from GeoNames. The current full URL for the downloads page is http://download.geonames.org/export/zip/.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion