Take your business to next level
Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.
WP Statistics downloads the Geolocation database from JSDelivr by default and hosts it locally in wp-content/uploads/wp-statistics. However, since the private network or intranet does not have access to JSDelivr for downloading the database, this document provides instructions on how to ensure WP Statistics uses a locally hosted Geolocation database while maintaining compatibility with a private network.
wp_statistics_geolocation_download_url
The wp_statistics_geolocation_download_url
filter allows customization of the URL used to download the Geolocation database in the WP Statistics. This is particularly useful when hosting the Geolocation database on a private network or custom server.
wp_statistics_geolocation_download_url
filter to override the default download URL with the URL of your hosted Geolocation database.functions.php
file or a custom plugin:function custom_geoip_download_url($defaultUrl) {
// Change the URL to your custom GeoIP database URL hosted on your private network
$customUrl = 'https://your-private-network-server.com/path-to-geoip-database/geoip-database.tar.gz';
return $customUrl;
}
add_filter('wp_statistics_geolocation_download_url', 'custom_geoip_download_url');
By following these steps, you can successfully ensure WP Statistics uses a locally hosted Geolocation database while maintaining compatibility with your private network.
Become part of our growing family of +600,000 users and get the tools you need to make smart choices for your website. Simple, powerful insights are just a click away.