Wordpress Get User Location


It has been mentioned previously that the ability to grab the users location details would be handy.


I have found some plugins that grab the user IP to determine the country.



I am hoping to center a google map on to the users country using WPMUDEV Google Maps plugin.

I am just looking to get the users country, not any thing more specific for the time being.

That should not be a privacy issue.

Could this not auto suggest the language as per WPML?

Does anyone have any suggestions on getting the user country?



  • Philip John
    • DEV MAN’s Apprentice


    You'd just need something to do a reverse IP lookup on the user's IP address. That shouldn't cause any issues and won't be visible to the user.

    Or you could ask for the user's location through the browser although that will be more specific and will require user consent.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.