How to Block an IP Address from Wordpress

How to Block an IP Address from Wordpress thumbnail
Block an IP address from a WordPress blog.

When you write a WordPress blog, occasionally you may encounter individuals that harass you on your blog. Perhaps you begin to receive unwanted comments or you have other reasons to wish to restrict access to your blog. Block an IP address from WordPress by creating a simple text file and uploading it into the root directory of your blog. The text file will contain code that will block access to your blog and an error code will generate to Internet users with this IP address.

Things You'll Need

  • Text editor (Notepad or something similar)
  • File Transfer Protocol "FTP" program
Show More

Instructions

    • 1

      Open the text editor and enter "order allow,deny" on one line. Enter "deny from *place the IP address here*" on the next line, replacing *place the IP address here* with the actual IP address. Enter "allow from all" on the third line.

    • 2

      Save the text file and name it ".htaccess."

    • 3

      Open the FTP program you use to manage your WordPress blog. Enter your username and password to log in to the program.

    • 4

      Upload the text file you created into the root directory of your blog by dragging the file from the left side of the FTP program to the right side into the proper root directory of your blog. The root directory is your blog's URL.

    • 5

      Log out of the FTP program.

Related Searches:

References

  • Photo Credit blog image by dinostock from Fotolia.com

Comments

  • Jessie Gb Dec 19, 2010
    And what if I want to block 2 IP adresses? just use the third line for another "deny from..." and on the fourth line "allow from all"?

You May Also Like

Related Ads

Featured