- Sep 10, 2010
- 11,805
- 26,657
As I said before, it is a pain in ass when you have a dynamic IP (like I do) / want to access the admin from your mobile or from your office .. It's a great trick if you have a static IP though
Create .htaccess file in wp-admin directory with the following content:
Order Deny,Allow
Allow from YOUR IP
Deny from all
Valid IP Addresses
IP addresses are in the form xxx.xxx.xxx.xxx and each of these four numbers is from 0-255.
You can enter partial addresses to restrict larger blocks of addresses:
1.2.3.4 Blocks one specific IP address 1.2.3. Blocks IP address in the range 1.2.3.0 to 1.2.3.255 (ie.. 1.2.3.xxx) 1.2. Blocks IP address in the range 1.2.xxx.xxx 1.2 Blocks IP address in the range 1.2xx.xxx.xxx