Unleash the Full Potential of Your PrestaShop Store

Welcome to MyPresta.eu – Your reliable partner in the e-commerce world. Find innovative modules that will take your business to a new level.

How to download GeoLite2-City.mmdb.gz file for PrestaShop ?

In order to use Geolocation tools in PrestaShop 1.7 you need to download and unpack  GeoLite2-City.mmdb.gz file into the /app/Resources/geoip/ directory. Unfortunately - since 30 December 2019 this file is not available to download anymore(before 30 December 2019 it was possible to download it without any additional steps - file was available to download directly by link).

 

GeoLite2-City.mmdb.gz file - what it contains?

GeoLite2-City database created by MaxMind.com contains thousands of records with information about ip-country and even ip-city associations. Thanks to this file - in context of PrestaShop - we will be able to identify customers' origin. The way the IP-based geolocation works is simply by checking which IP range is used by which area, using an IP-to-location database. So, you can find the information like the country and the city that your users come from, just by knowing their IP address.

 

How to download GeoLite2-City.mmdb.gz for PrestaShop ?

As I already mentioned this file is still accessible for free - even for commercial projects - but it requires some additional steps before you will be able to download it. Below you can find detailed instructions.

  1. Create an account on maxmind.com website
    Open signup to maxmind website. Register process is absolutely free . So you do not have to worry that you will pay something. You need to use valid email address - because maxmind requires email verification.
    Regarding to the rest of user details - you can even fill out the form with fake details, but I do not suggest it - your account can be deleted so in the future you will not be able to download updates of GeoLite2-city database.
    maxmind register account
  2. Confirm your email address
    You will receive an email from maxmind. Click on link attached to email. You will be redirected to maxmind page where you can setup your account password.

  3. Login to your maxmind user account
    Your email address is your username, password you set in previous step. So you can log in to your maxmind account.
    Left hand side column has section "GeoIP2 / GeoLite2" section. Click there on "Download files" menu item.
    You will be redirected to page "Download GeoIP2 and GeoIP legancy databases". There is a subsection "Download databases" where you can find link to GeoLite2-City file. Please make sure that you clcik on download link near the GeoLite2-City (not: GeoLite2-City_CSV - it is very important)

    geolite2-city download - for prestashop geolocation

 

That's all. You can unpack downloaded file and move the GeoLite2-City.mmdb file into the /app/Resources/geoip/ directory. Thanks to this you will be able to use geolocation in prestashop 1.7 and in our modules like:


If you are looking for Geoliation for old PS releases, check this: GeoLiteCity.dat for PrestaShop 1.6.x

Zdjęcie autora: Milosz Myszczuk

Artykuł napisany przez Milosza Myszczuka, eksperta PrestaShop i oficjalnego moderatora społeczności PrestaShop. CEO i założyciel agencji interaktywnej VEKIA. Dowiedz się więcej.

If you like this article, support our work!

Comments