ZIP Search Module Databases
There are two versions of ZIP Search in the wild–currently 4.0.1 (the latest) and all earlier versions (1.0-3.5). Make sure you use the right install instruction set based on your version below.
NEW Installation (Versions 3.3+)
For this version of ZIP search, you do not need a SQLite database installed, as we use your existing MySQL installation and import the ZIP data directly into it. This improves performance and allows for calculation caching for larger distances with quicker search times.
- ZIP Search supports the following databases for Version 3.3+ (NOTE: These databases will NOT work with earlier versions of ZIP search–see below for earlier DB versions!)
- US database (670KB file)
- UK database (20MB file)
- Canadian database (8.8MB file)
- Australian database (43KB file)
- Mexico database (777KB file)
- Belgium database (requires v3.6) (19KB file)
- Austria database (requires v3.6) (32KB file)
- Germany database (requires v3.6) (115KB file)
- Lichtenstein database (requires v3.6) (1KB file)
- Switzerland database (requires v3.6) (56KB file)
- French database (requires v3.6.1) (56KB file)
- Spain database (requires v3.6.2) (73KB file)
- New Zealand database (requires v3.6.2) (462KB file)
- Czech database (requires v3.6.3) (63KB file)
- Malaysia database (requires v3.6.3) (31KB file)
- Italian database (requires v4.0.1) (63KB file)
- Estonia database (requires v4.0.4) (62KB file)
- South Africa database (requires v4.0.7) (20KB file)
- Romania database (requires v4.0.9) (186KB file)
- Netherlands database (requires v4.0.13) (9MB file)
- Combined European Postal (BE, AT, LI, CH, DE) database (requires v3.6) (221KB file)
- Other countries NOT yet supported—contact us if you have a data source we can use to create one!
- After downloading the database(s), go to the ZIP Search tab under Directory Admin->Manage Options, and select the first file you downloaded for import. Click Choose File and then Upload File to get started:
- Once the upload is complete, which may take a few min depending on the size of the database you’re uploading, next you must import the data from the file into your own BD database. Do this by clicking the “Start Import” button on the next screen:
- The database import can take a long, long time, depending on the database you’re using (UK is a long one, US and Australia import pretty quickly. Canada is in between). When I first imported the US database on a reasonably fast server, it took 20 min. UK databases seem to take the longest–over 4 hours in some cases! It all depends on your hosting server horsepower and RAM. Once the database import is complete, the module will automatically build a cache of the ZIP data for you. Now you’re ready to map your ZIP code field and begin searches:
- You should map the field you defined as ZIP/Postal Code and update the units to Miles or Kilometers for the the proper output of the search. Once you do that, click Save Changes and you’re done!
- To import additional databases, simply go back to Step 1 and repeat for each new database you want.
OLD Installation (Versions 1.0-3.2)
This version of ZIP Search requires that you have SQLite installed as part of your PHP setup. This is an OLDER version of ZIP Search now and superceded by Version 3.3. The SQLite version had distance search problems with radii larger than 50 miles. Please upgrade to 3.3 if you have an older version. These instructions are included for those that cannot upgrade at this time.
- To install the ZIP Search database, first you need to download the proper database, depending on your location
- After downloading the database, unzip the database. There should be a single file inside.
- Rename the file to “zipcodes.db”
- Now, using FTP or SCP, upload the file to your server under wp-content/plugins/business-directory-zipcodesearch/db/ which should replace the existing file.
- Go under Directory Admin->Manage Options, ZIP Search tab. You should now see this available, depending on which database(s) you uploaded
NOTE: These databases are only compatible with the Business Directory ZIP Search Module.
If you get errors on install…
The ZIP Search Module (version 1.0-3.2) requires that you have SQLite installed on your web host. Not all web hosts have this (which is why we’re migrating it!) so if you are technical enough, you can follow the instructions for installing to your server here, if it’s missing: http://php.net/manual/en/book.sqlite.php