Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BruceMcKinnon/e7c4d42e9254437d203e0da863fe3607 to your computer and use it in GitHub Desktop.
Save BruceMcKinnon/e7c4d42e9254437d203e0da863fe3607 to your computer and use it in GitHub Desktop.
htaccess block WP admin pages by IP address
# Block access to wp-admin.
order deny,allow
# Allow one IP address
allow from z.z.z.z
# Allow from a range of IP addresses
allow from x.x.x.x/24
allow from y.y.y.y/27
# deny everyone else
deny from all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment