Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using WordPress mu and need to redirect my site based on the users geo location.

For example if you go to yahoo from the US it will goes to, but if you visit the site from India it goes to or in the UK to, etc.

Is there a way to have my WordPress do this?

share|improve this question

1 Answer 1

You can try this

Alternatively, roll your own, using any GeoIP service (MaxMind for example, or get your own GeoIP database) and use wp_redirect based on the $_SERVER['REMOTE_ADDR'].

share|improve this answer
I know this is an old post, but I'm about to implement a similar thing and wondered why no-one here or on many other posts have considered PHP's GeoIP functions? - It appears you can use this without an external IP DB, etc. – TomC Nov 12 '13 at 2:45 you still need Maxmind's Geo database. The question isn't really about geolocation as it is about doing a redirect based on IP address in WordPress. – soulseekah Nov 12 '13 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.