Update: WP Engine GeoIP is available to WP Engine customers on a Business plan or higher. For more information and to take GeoIP for a spin, contact WP Engine at [email protected] or 877-973-6446.

You can also reach out to our Support Team via the User Portal

This can be used for a number of important applications such as personalizing web content, tailoring advertising, complying with legal regulations, and many other uses. The GeoIP look-up actually happens on WP Engine’s servers so there is no need to connect with an external service to provide the data, which can be expensive and result in slow load times. This makes it faster than any third party service and appropriate for many exciting business applications.

One of the best features of Labs’ GeoIP implementation is the caching integration we have built into the feature. We are very excited that GeoIP integrates with our EverCache technology to keep sites fast and scalable.

Imagine you run a hotel with 6 locations. If a person hits your home page from one of those locations, you’d love your website to show local information, like walking maps from the hotel to food, attractions, and mass transit. For everyone else you’re in “sell” mode — showing off the views and amenities and encouraging reservations. But this requires a very special page-caching configuration — one in which you have 7 different versions of the page, in very specific contexts.  If you took a simplistic approach and said “one cache per city,” you’d have 1000s of individual city-based caches, all but 6 of which are identical. This type of highly custom advanced caching is already set up in the Labs GeoIP.

Without this cache integration a standard GeoIP solution would require you to disable caching and make the website much slower and the experience less reliable. Because we uniquely integrate our GeoIP with the cache, you still have the scale and speed of WP Engine, but with the customization of GeoIP.

The fields included in the GeoIP are:

  • Continent
  • Country
  • Country of Registration
  • Country Represented and Type of Representation (For military bases)
  • Region Subdivisions
  • City Name
  • Postal Code
  • Latitude (The latitude and longitude are near the center of the most granular location value returned: postal code, city, region, or country)
  • Longitude
  • Metro Code (US only)
  • GeoNames IDs (for localization and pairing outside data)


99.8% accurate on a country level, 90% accurate on a state level, 83% accurate on a city level for the US within a 40 kilometer radius.

You must be a registered Alpha Labs participant to participate in this program. Click here for more information on how to participate.

GeoIP Internal Demo

Labs has created some urls for as an example for people curious about using the service.  Each page will display different fields such as city, state or country.

The home page is not cached and will show details about your current location if available.  http://geoiptest.wpengine.com/

Below are a few paths that have been configured to show how caching can be setup per geographic location information of the requestor.

For example, users from the same city will see the same cached information at this page, http://geoiptest.wpengine.com/geo-city/

Users browsing from the same US state will see the same cached information at this page, http://geoiptest.wpengine.com/geo-state/

Users browsing from the same country will see same cached information at this page, http://geoiptest.wpengine.com/geo-country/

This configuration can be configured on the server per url and any combination of the geographical fields listed above.

How do I use this?

1. Install the current version of the GeoIP plugin from the repository: https://wordpress.org/plugins/wpengine-geoip/

2. Once installed, the plugin can return results to the install easily. The plugin has simple api calls for country code, region/state, city, with more to come soon.  Once accessing the geoip instance object, retrieve the string value like the example code below.

function geoip_append_content($content) {
$geo = Wpengine\Geoip::instance();
?> How’s the weather in <?=$geo->city()?>, <?=$geo->region()?> <?=$geo->country()?>?</br></br> <?php
add_filter(‘the_content’, ‘geoip_append_content’ );

Put this code in a .php file of your choice in wp-content/plugins/, activate it in wp-admin/plugins.php and see the code output in the content of your page.