• Resolved nettisg

    (@nettisg)


    Hi,

    Can GeoIP Database be loaded from Google Cloud Storage via WP-stateless? I’m facing problems with locate sites users and I’m wondering if it’s caused by the database placement. The GeoIP database is located in Google Cloud as are all the other media in the site too. I’m gettin error below:

    “PHP message: WP Statistics Error: Error opening database file (gs://***/wp-statistics/GeoLite2-Country.mmdb). Is this a valid MaxMind DB file?”

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hey,

    Thank you for opening the topic, basically, this is not possible and should be loaded from the local server at the moment.

    But your idea looks amazing, I’m going to create a new task for our development team to work on.

    “PHP message: WP Statistics Error: Error opening database file (gs://***/wp-statistics/GeoLite2-Country.mmdb). Is this a valid MaxMind DB file?”

    Yes, it is.

    Thread Starter nettisg

    (@nettisg)

    Hi and thank you for your reply. Is it possible to get, or is there already, for example some hook to overwrite the database address?

    Plugin Author Mostafa Soufi

    (@mostafas1990)

    Good point, with this filter you can do it since I added it in the development version

    https://github.com/wp-statistics/wp-statistics/commit/ed5e0764ef62f890f9d15f1bf73e1241f08b39c9

    Example:

    add_filter('wp_statistics_geo_ip_download_url', function ($source, $pack) {
        if ($pack == 'country') {
            $source = 'https://yourgepipurl.com';
        }
        
        return $source;
    });
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘GeoIP Database via WP-Stateless’ is closed to new replies.