This plugin ban entire country from visiting your website. This is useful if you got an attack / ddos by specific country. You must use Cloudflare to use the feature. How to use:
- Download plugin here: cloudflare-ban-country
- Login to WordPress, Plugins -> Add New -> Upload New Plugin
- Activate
- Go to Plugin Editor, and Edit Cloudflare Ban Country -> plugin.php, Change to your desired countries, default is China:
// Put banned countries here
Example if you want to ban US and India:
$banned_countries = [
'CN',
];// Put banned countries here
$banned_countries = [
'US',
'IN',
]; - Save Changes
That’s all and banned country will get message 403 forbidden.