{"id":163,"date":"2021-05-11T00:41:25","date_gmt":"2021-05-11T00:41:25","guid":{"rendered":"http:\/\/iplocationblock.test\/codex\/local-database-settings\/"},"modified":"2021-05-11T11:55:32","modified_gmt":"2021-05-11T11:55:32","slug":"local-database-settings","status":"publish","type":"codex","link":"https:\/\/iplocationblock.com\/codex\/local-database-settings\/","title":{"rendered":"Local database settings"},"content":{"rendered":"<p>This plugin has multiple IP address geolocation databases distributed by  <a href=\"https:\/\/www.maxmind.com\/\" title=\"IP Geolocation and Online Fraud Prevention | MaxMind\">Maxmind<\/a> and <a href=\"https:\/\/www.ip2location.com\/\" title=\"IP Address Geolocation to Identify Website Visitor's Geographical Location\">IP2location<\/a>. Utilizing multiple data  sources is an important mechanism that can complement each other when data  is missing. These databases are managed by the Geolocation API library named  <a href=\"https:\/\/github.com\/tokkonopapa\/WordPress-IP-Geo-API\" title=\"GitHub - tokkonopapa\/WordPress-IP-Geo-API: A class library combined with WordPress plugin IP Location Block to handle geo-location database of Maxmind and IP2Location.\">IP Geo API<\/a> which which has been separately developed as an another project.<\/p>\n<h3 id=\"geolocation-api-library\">Geolocation API Library<\/h3>\n<p>IP Geo API can be installed with the geolocation databases in one of the  following directories:<\/p>\n<ol>\n<li><code class=\"highlighter-rouge\">\/wp-content\/ip-geo-api\/<\/code><\/li>\n<li><code class=\"highlighter-rouge\">\/wp-content\/uploads\/ip-geo-api\/<\/code><\/li>\n<li><code class=\"highlighter-rouge\">\/wp-content\/plugins\/ip-location-block\/ip-geo-api\/<\/code><\/li>\n<\/ol>\n<p>The actual storage location depends on the permission setting of the WordPress  tree. If you find it\u2019s 3. then it is necessary to adjust the permissions so  that it becomes 1 or 2. to prevent the geolocation databases being removed on  updating this plugin.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/LocalDatabaseSettings.png\" alt=\"Local database settings\" title=\"Local database settings\" \/><\/p>\n<p>In some cases, you might see the following error message right after your first installation. This would be caused by a permission touble due to your server\u2019s  security configurations.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/ErrorGeoAPI.png\" alt=\"Error of IP Geo API\" title=\"Error of IP Geo API\" \/><\/p>\n<p>In this case, you have to install <a href=\"https:\/\/github.com\/tokkonopapa\/WordPress-IP-Geo-API\" title=\"GitHub - tokkonopapa\/WordPress-IP-Geo-API: A class library combined with WordPress plugin IP Location Block to handle geo-location database of Maxmind and IP2Location.\">IP Geo API<\/a> by your own hand and  once deactivate this plugin then activate it again. Please find how to do it  in the codex \u201c<a href=\"https:\/\/iplocationblock.com\/codex\/how-can-i-fix-permission-troubles\/\" title=\"How can I fix permission troubles? | IP Location Block\">How can I fix permission troubles?<\/a>\u201d.<\/p>\n<h3 id=\"type-of-geolocation-database\">Type of geolocation database<\/h3>\n<p>In the location information database downloaded by default, only the IP address and the corresponding country code are stored. But when you switch the type of  database to another, you will be able to get the city name, coodinates of  longitude and latitude.<\/p>\n<p>Please refer to <a href=\"https:\/\/iplocationblock.com\/codex\/ip-location-block-maxmind-zip-ipv4\/\" title=\"ip-location-block-maxmind-zip-ipv4 | IP Location Block\">ip-location-block-maxmind-zip-ipv4<\/a> and  <a href=\"https:\/\/iplocationblock.com\/codex\/ip-location-block-maxmind-zip-ipv6\/\" title=\"ip-location-block-maxmind-zip-ipv6 | IP Location Block\">ip-location-block-maxmind-zip-ipv6<\/a> to know how to change the source  of databases.<\/p>\n<h3 id=\"cloudflare--cloudfront-api-library\">CloudFlare &amp; CloudFront API library<\/h3>\n<p>If you are using a reverse proxy or load balancing service provided by  <a href=\"https:\/\/www.cloudflare.com\/\" title=\"Cloudflare - The Web Performance &amp; Security Company | Cloudflare\">CloudFlare<\/a> or <a href=\"https:\/\/aws.amazon.com\/cloudfront\/\" title=\"Amazon CloudFront \u2013 Content Delivery Network (CDN)\">CloudFront<\/a>, you can obtain the  country code of the access source through special environment variables.<\/p>\n<p>To use this, it is necessary to install a dedicated API library. Please  refer to <a href=\"https:\/\/iplocationblock.com\/cloudflare-cloudfront-api-class-library\/\" title=\"CloudFlare &amp; CloudFront API class library | IP Location Block\">CloudFlare &amp; CloudFront API class library<\/a>.<\/p>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","class_list":["post-163","codex","type-codex","status-publish","hentry","codex-category-dashboard"],"_links":{"self":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/codex\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/codex"}],"about":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/types\/codex"}],"replies":[{"embeddable":true,"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/comments?post=163"}],"wp:attachment":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/media?parent=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}