Local geolocation database

You are here:

What are local databases for?

If you don't want to use our API because you prefer to have an in house solution or because it results too expensive for your projects you can still use our plugins with a database installed in your server. For that you need to have an active subscription.

Requirements:

You need to have an active GeotWP subscription in order to make the plugins work with your own database. If you don't have one visit your account before continuing.

Depending on your plan you will have one or more local databases available. You will need to whitelist each site in the local databases domain field. Please follow all the common settings (Api keys, whitelist domain, etc) to make the plugin work.

Installing Databases

Once you did all the requirements you are ready to install and active the database. Depending on which provider you choose you need to follow certain steps.

Maxmind users

For Maxmind you need to download the city database and unzip it. Then name the file GeoLite2-City.mmdb and place it in the following path

wp-content/uploads/geot_plugin/GeoLite2-City.mmdb

If you are using the free Maxmind database from Geolite you can use Geot Maxmind plugin to automatically download and update the database for you.

If you are using premium version or you don't want to use our plugin, remember to update your database regularly to keep accuracy as much as possible.

Lastly refer to activate database section to proceed.

Kinsta users

Simple contact Kinsta hosting support department and ask them to enable GeoIp for your account. Depending if you are targeting countries, states or cities they will enable the correspondent cache bucket for you.

Lastly refer to activate database section to proceed.

WP Engine users

Simple contact Wp Engine hosting support department and ask them to enable GeoIp for your account. Depending if you are targeting countries, states or cities they will enable the correspondent cache bucket for you.

Lastly refer to activate database section to proceed.

IP2Location users

For IP2Location you need to name the file IP2LOCATION.BIN and place the file in the following path:

wp-content/uploads/geot_plugin/IP2LOCATION.BIN

Remember to update your database regularly to keep accuracy as much as possible.

Lastly refer to activate database section to proceed.

Activate Database

Once you installed the database you need to go to GeotargetingWP -> Settings and check the box for the new setting field that just appeared. The plugin will detect which database you installed, and you simple need to check the box to make it live

enable database

Change filename or location

You can change the default location and file name using one of the following php filters:

geot/mmdb_path

geot/ip2location_path

For example to change the location and filename of Maxmind you can do the following in your functions.php

add_filter( 'geot/mmdb_path', function(){ WP_CONTENT_DIR . '/database/GeoLite2.mmdb';} )