Insight Things

A scientific blog revealing the hidden links which shape our world

Increase accuracy of Custom Content by Country (by iControlWP)

This blog uses Custom Content by Country (by iControlWP) to localize content. However, my tests with geopeeker.com were disappointing. The result was always U. S. related instead of the countries the servers were actually situated in. It turned out that it’s not a matter of the plugin itself (it’s fantastic!), but the data on IPs and countries is weak. The good thing is that I could increase accuracy by replacing the IP data with those from ip2location. Here is how I achieved it!

Go to your database administration tool (I use phpMyAdmin). There, select the table ip2nation, go to operations and truncate the table like shown below (please excuse that my hoster provides a German interface). Check whether you really selected the correct options!

How to truncate ip2nation

Now download theย IP data which I already modified to suit our needs. Import the content of the CSV file to the still existing table ip2nation. This is simple, but see a screenshot below.

Import new IP data

This should improve accuracy of Custom Content by Countries. Try again with geopeeker.com and be happy ๐Ÿ˜€

3 Comments

  1. Hi Jan,

    I’m the author of the Content by Content country… I’m curious, could you possible supply us with the SQL import files in the same format. I’d be happy to use a better DB, but I’d need the data prepared in the correct format.

    Is this possible? Please feel free to email me directly to chat about it!

    Thanks!
    Paul.

  2. This worked perfectly, thanks for putting this together ๐Ÿ˜€

Leave a Reply

Your email address will not be published.

*

© 2017 Insight Things

Theme by Anders NorenUp ↑

3 Shares
Share2
+11
Share
Reddit
Tweet