

How to Block IP Address in WordPress-:
If you want to block a visitor from your WordPress site, then you can block their IP address and prevent them from visiting the site. By blocking Spam traffic, you can save Bandwidth of your site. Here I will tell you three easy methods to block the IP address so let’s start
1. Block IP Address in WordPress using .htaccess File-:
You can easily block an IP address by editing your htaccess file. If you do not know how to edit .htaccess file, you can read this article: How to edit .htaccess file in WordPress site to block any IP address from the website, add the IP address to your .htaccess file. This way,
order allow, deny
deny from 104.24.117.129
allow from all
If you want to block a lot of IP addresses on your WordPress site, then deny from [IP address], adding one after the other.
order allow, deny
deny from your IP address
deny from your IP address
deny from your IP address
deny from your IP address
allow from all
note: Do not add IP Address in between # BEGIN WordPress and # END WordPress
2. Block IP Address in WordPress using LionScripts Plugin-:
As this plugin not up to date but works very fine. The LionScripts plugin helps block spam visitors and bad IP addresses on your WordPress website. This plugin allows you to block IP addresses in two ways – Block IPs Manually and Upload IP Address (CSV Format) First, install and activate the LionScripts plugin on your site. After activating the plugin, click on LionScripts >> IP Address Blocker and add IP Address. Then click on the Save Changes button to store your settings. Now, this plugin will block the IP address you have added.
using this plugin you can block unlimited IP addresses. you can note down IP addresses in a Excel file and upload it for bulk blocking of IP. This Plugin is also able to block Suspicious account activity and Auto Blocking of Brute Force attack. Hackers do the brute-force login attacks very often to gain the access to your website, which may become a negative signal to the shared hosting service provider for your website, leading to the account suspension too, if not taken care of very soon.
3. Block IP Address in WordPress using cPanel-:
This is also a very easy way to block an IP address from a WordPress website. Simply, log into your web hosting cPanel. Then go to the Security section, then click on IP Blocker. Now add the IP address you want to block from your website and then click on the Add button. You can successfully spam using your cPanel from your WordPress website. IP is blocked.
If you like my work, Please Share on Social Media! You can Follow WP knol on Facebook, Twitter, Pinterest and YouTube for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.