How to enable user registration for specific country and disable registration from all other countries?

After some thought, I have a better answer. Although keep in mind all of this can be circumvented by having a friend living in the US:

  1. Credit card transaction – This is your best bet for verifying, however it’s possible the person is foreign and has a US credit card, be it for business purposes, or to order things from the US. This will likely cost you money, and you’ll be subject to finance & privacy laws
  2. Mobile Phone SMS – This can be done using an external SMS service, but keep in mind I could take a holiday in the US, and buy a pay as you go phone, then use your service when I return to the UK, as a UK citizen. SMS services normally cost money, and you’ll be subject to personal information laws
    Try
    http://wordpress.org/extend/plugins/sms-text-message/ or http://wordpress.org/extend/plugins/quick-sms/
  3. GPS – This would work, but, it assumes the other person can be trusted, and is easily spoofable. Numerous devices and browsers do not support this, and most desktop machines lack the hardware. Some browsers ask where the user is, letting them move to the US by choice. This also discriminates against American citizens on holiday elsewhere ( President Obama on holiday in Italy tries to get on your site? Nope, access denied )

All three can be bypassed or spoofed. All three require that the user trust you ( they’re likely to leave the site in disgust or opposition, after all would you hand over your credit card details or mobile phone number to just anyone? ), also these details are all private, and are heavily regulated.

If your site is usable by non-US citizens, then you shouldn’t limit yourself. If your site provides a service that is meaningless outside the US, then let them sign up if they choose but warn them that there won’t be much point.

To summarize:

There are measures you can take, but the internet is inherently anonymous, and you can’t be sure if the user is an American at a Russian computer cafe, or a Russian sitting on the whitehouse lawn.

Of Note

All three methods I pointed out are beyond the scope of this website, as they are not WordPress problems, but general problems. There may be plugins that can help, but thats a different question. You will certainly need help with credit cards ( beyond WordPress, you need to be able to handle raw credit details online, you can’t just use a paypal or WordPress plugin, then there’s compliance needed for your code )