🔥 Black Friday Sale: Get 65% OFF Any PageForge Pro Plan! Use code BF65 Claim Offer →
Conta Get it free
WP GeoNames icon
Manutenção ativamente Testado com WP 7.1 #4 in city

WP GeoNames

Allows you to insert all or part of the global GeoNames database in your WordPress base.

Instalações ativas100+100+ nível
Downloads · 30d239▼ -28.2% vs prev. 30d
Classificação5/52 comentários
Pontuação da saúde71/100Bom
Downloads de todos os tempos17.1KSince Nov 2014
Suporte resolvido—Sem tópicos recentes
RequerWP 5.0PHP 7.0+
Downloads · 7d67▲ +17.5% week over week
Nosso veredicto

Escolha sólida

WP GeoNames is a solid plugin choice in 2026, with a few things worth checking first. It runs on 100+ sites, is rated 5/5 and was last updated 2 months ago, and scores 71/100 on our health check.

  • Testado com as últimas WordPress (7.1)
  • Base de usuários pequenas (mais de 100 instalações ativas)
  • Muito poucos comentários até agora

Como ele se acumula?

Lado a lado em instalações, atualizações, avaliações e suporte

Downloads diários

142842Aug 31Oct 14Nov 28
Ontem10
Média diária (1y)5
Dia de pico5612 de outubro de 2026
Últimos 12 meses1.8K

Os picos de download geralmente seguem uma nova versão — cada site que atualiza automaticamente é um download.

Rankings

Where WP GeoNames stands today

WordPress.org Classificações de pesquisa

Posição ao vivo na pesquisa de plugins, top 100
Palavra chavePosiçãoPlugins concorrentesCategoria
cidade #68 2,190 Best city plugins →
data >100 10,000 Best data plugins →
geo #68 1,282 Best geo plugins →
sql #52 2,790 Best sql plugins →
table >100 10,000 Best table plugins →

Adoção da versão

Compartilhamento de sites ativos por lançamento.

  • 1.977.2%
  • 1.813.4%
  • 1.79.5%

Divisão de classificação

★★★★★ ★★★★★ 5 de 2 comentários

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About WP GeoNames

From the official readme · v1.9.3

Descrição

This lightweight plugin makes it easy to install the millions of GEONAMES Data on your WordPress site.
It allows :

  • Install data from one or more file (place & postal code) ;
  • Choose column to install to avoid excessive enlargement of the base ;
  • Choose type of data to install (city, park, road…) ;
  • Remove all the data.
  • Check data in the database.
  • Edit and change datas from Dashboard.
  • Display the places on OpenStreetMap.

A shortcode is also available to create a city region and country taxonomy.

This plugin will give you plenty of ideas to improve the quality of your website.

Official GeoNames website.

Instalação

Install and Activate

  1. Unzip the downloaded wp-geonames zip file
  2. Upload the wp-geonames folder and its contents into the wp-content/plugins/ directory of your WordPress installation
  3. Activate WP GeoNames from Plugins page

Insert GeoNames data

  1. Go to the new tab in Settings : WP GeoNames
  2. Select the GeoNames file you want
  3. Select Columns you want to insert (latitude, longitude, population, elevation…)
  4. Select type of data you want (city, building, lake, mountain…)
  5. Click ADD

You can insert as many file as you want.

Usar

You must use the WordPress tools to get the database. WPDB is your friend.
You can write the code directly in your template or in functions.php of your theme.

Name of the table : ($wpdb->prefix)geonames

Names of the columns :

  • idwpgn (bigint)
  • geonameid (bigint)
  • name (varchar)
  • asciiname (varchar)
  • alternatenames (text)
  • latitude (decimal)
  • longitude (decimal)
  • feature_class (char)
  • feature_code (varchar)
  • country_code (varchar)
  • cc2 (varchar)
  • admin1_code (varchar)
  • admin2_code (varchar)
  • admin3_code (varchar)
  • admin4_code (varchar)
  • population (bigint)
  • elevation (int)
  • dem (smallint)
  • timezone (varchar)
  • modification_date (date)

Feature Class & Code here.

Example : get GPS position for a specific city in a specific country :

global $wpdb;
$s = $wpdb->get_row("SELECT latitude, longitude 
    FROM ".$wpdb->prefix."geonames 
    WHERE name='Paris' and country_code='FR' ");
echo $s->latitude . " - " . $s->longitude;

Example : 10 most populous cities in Switzerland :

global $wpdb;
$s = $wpdb->get_results("SELECT name, population 
    FROM ".$wpdb->prefix."geonames 
    WHERE country_code='CH' and feature_class='P' 
    ORDER BY population DESC 
    LIMIT 10");
foreach($s as $t) {
    echo $t->name. " : " . $t->population . "<br />";
}

Example : hotels within 40 km from Marbella (ES) :

global $wpdb;
$p = $wpdb->get_row("SELECT latitude, longitude 
    FROM ".$wpdb->prefix."geonames 
    WHERE name='Marbella' and country_code='ES' ");
$dlat = 40 / 1.852 / 60;
$dlon = 40 / 1.852 / 60 / cos($p->latitude * 0.0174533);
$s = $wpdb->get_results("SELECT name, latitude, longitude
    FROM ".$wpdb->prefix."geonames 
    WHERE country_code='ES' and 
        feature_code='HTL' and 
        latitude<".($p->latitude+$dlat)." and
        latitude>".($p->latitude-$dlat)." and
        longitude<".($p->longitude+$dlon)." and
        longitude>".($p->longitude-$dlon)."
    LIMIT 100");
foreach($s as $t) {
    $d = (floor(sqrt(pow(($p->latitude-$t->latitude)*60*1.852,2)+pow(($p->longitude-$t->longitude)*60*1.852*cos($p->latitude * 0.0174533),2))));
    if($d<=40) echo $t->name. " : " . $d . " km<br />";
}

Example : Suggest cities during the typing by the user (like Google search)

You must use Ajax action and PHP function with the name “wpgeonamesAjax”

In your theme, in function.php ; add :
function wpgeonamesAjax() {
global $wpdb;
$s = $wpdb->get_results(“SELECT name
FROM “.$wpdb->prefix.”geonames
WHERE country_code=’FR’ and feature_class=’P’ and name LIKE ‘”.strip_tags($_POST[“city”]).”%’
ORDER BY name
LIMIT 10″);
foreach($s as $t) {
echo ‘

‘.$t->name.’

‘;
}
}

In your theme, in the right page ; add :

<input id="inpCity" name="inpCity" type="text" onkeyup="sugg(this,'<?php echo admin_url('admin-ajax.php'); ?>');" />
<div class="suggCity" id="suggCity"></div>
<script>
function sugg(f,g){
    jQuery(document).ready(function(){
        jQuery.post(g,{'action':'wpgeonamesAjax','city':f.value},function(r){
            jQuery('#suggCity').empty();jQuery('#suggCity').append(r.substring(0,r.length-1));
        });
    });
}
</script>

Log de Changes

1.9.3

12/10/2026 – Update for PHP 8.5

1.9.2

02/05/2025 – Fix translation warning with WP 6.8

1.9.1

05/12/2024

  • Fix XSS vulnerability in shortcode attributes
  • Fix translation issue with WP 6.7

1.9

18/10/2024 – Fix XSS vulnerability on geoSearch field

1.8

08/02/2022

  • Update Leaflet 1.7.1.
  • Update SumoSelect 3.4.2.
  • Split admin sidet in a specific file.

1.7

21/03/2020

  • Fix issue with very long line in Geoname DB.
  • Add nonce.
  • Braces style standardisation in the code.

Registro de change completo em WordPress.org →

Capturas de tela

WP-GeoNames main tab in the Dashboard.
WP-GeoNames main tab in the Dashboard.
Check your database in Dashboard.
Check your database in Dashboard.

Para desenvolvedores

Este é o seu plugin? Mostre os números.

Adicione um crachá ao vivo ao seu site, Documentos ou Readme do GitHub. Ele é atualizado por conta própria - nenhuma conta necessária.

Selo de Instalações Ativas Selo de classificação Distintivo de pontuação de saúde

Best WP GeoNames alternatives

All city plugins →
Alternativas
Classificação Plugin Instalações ativas Classificação Atualizada Saúde
1 Cities Shipping Zones for WooCommerce Cities Shipping Zones for WooCommerce WooCommerce plugin for turning the state field into a dropdown city field. To be used as… by Condless 4K+ ★★★★★★★★★★ 4.7 (19) 1 dia atrás 83
2 RY City Select for WooCommerce RY City Select for WooCommerce Show a dropdown select as the cities input on WooCommerce. Auto set the postcode for… by Richer Yang 2K+ ★★★★★★★★★★ 4.9 (9) 1 semana atrás 83
3 ACF City Selector ACF City Selector This plugin adds a new (ACF) field to select a city depending on country and state/province. by Beee 100+ ★★★★★★★★★★ Sem comentários 4 meses atrás 53
5 Region City Landing Pages Builder Region City Landing Pages Builder Build Multiple Geographically Targeted Landing Pages Quickly Using Generic Text &… by sukanyasoftwares 100+ ★★★★★★★★★★ Sem comentários 6 anos atrás 25
6 Add Region by Country for WooCommerce Add Region by Country for WooCommerce Add Region by Country WooCommerce Add-on plug-in. by C-Metric 100+ ★★★★★★★★★★ Sem comentários 2 anos atrás 25
7 WC – APG City WC – APG City Adds to WooCommerce an automatic city name generated from the postcode. by Art Project Group 100+ ★★★★★★★★★★ 4.7 (3) 3 semanas atrás 74
8 Città italiane e cap codice di avviamento postale for Woocommerce Città italiane e cap codice di avviamento postale for Wooco… Selettore delle città italiane in fase di checkout by Roberto Bottalico 80+ ★★★★★★★★★★ 5 (1) 4 anos atras 32
9 Auto Populate Country/State/City/Ward DropDown Addon for Gravity Forms Auto Populate Country/State/City/Ward DropDown Addon for Gr… Automatically populate cascading Country, State, City, and Ward dropdown fields in Gravity… by Gravity Extra 30+ ★★★★★★★★★★ 1 (1) 1 mês atrás 58
10 NA E-Commerce Egypt Cities/States NA E-Commerce Egypt Cities/States Help to add all Egypt Cities/States for WooCommerce Check Out, And Setup to be transleted… by peter Napoleon 10+ ★★★★★★★★★★ Sem comentários 4 anos atras 23
11 IHS Geo Location IHS Geo Location This plugin detects your location and makes certain classes available to you which you can… by Imran Sayed 10+ ★★★★★★★★★★ 5 (3) 6 anos atrás 30

FAQ

WP GeoNames: quick answers

Respostas diretas, extraídas de dados ao vivo WordPress.org.

Fonte: WordPress.org

Is WP GeoNames free?

Yes. WP GeoNames is free to download and use from the official WordPress.org plugin directory.

Is WP GeoNames safe to use in 2026?

WP GeoNames is a solid plugin choice in 2026, with a few things worth checking first. It runs on 100+ sites, is rated 5/5 and was last updated 2 months ago, and scores 71/100 on our health check.

How many websites use WP GeoNames?

WP GeoNames is active on 100+ WordPress websites and has been downloaded 17,092 times since it launched in November 2014. It was downloaded 239 times in the last 30 days.

Does WP GeoNames work with WordPress 7.1?

Yes. The developer has tested WP GeoNames up to WordPress 7.1.5, the latest release. It requires WordPress 5.0 or newer.

What PHP version does WP GeoNames need?

WP GeoNames requires PHP 7.0 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.

When was WP GeoNames last updated?

The latest version, 1.9.3, was released on October 12, 2026 (2 months ago).

Who makes WP GeoNames?

WP GeoNames is developed and maintained by Jacques Malgrange.

What are the best alternatives to WP GeoNames?

The most popular alternatives to WP GeoNames are Cities Shipping Zones for W… (4K+ installs), RY City Select for WooComme… (2K+ installs) and ACF City Selector (100+ installs).

Alimentado por PageForge

Um modelo e uma planilha. Uma página real para cada pesquisa.

PageForge Transforma cada linha de um CSV em uma página WordPress com seu próprio título, URL, SEO campos e esquema, construído no layout que você já desenhou. Gratuito em WordPress.org.

  • CSV e XLSX, mais Google Sheets em Profissional e Empresarial
  • Seu próprio título, URL, SEO campos e esquema para cada página
  • Funciona com o editor de blocos, Elementor, Divi e Avada
  • Gratuito em WordPress.org, sem cartão de crédito

↑↓ mover↵ abrir