Hi all,
need some help with my wordpress site & how to restrict access to it to specific IP range.
Printable View
Hi all,
need some help with my wordpress site & how to restrict access to it to specific IP range.
What have you tried already?
Are you able to use .htaccess instead?
The best is to use .htaccess.
If you cannot restrict it within .htaccess, then you could use the following PHP code:
where "128.123.154.15" is the IP address which is allowedPHP Code:<?
if (substr($REMOTE_ADDR != "128.123.154.15") {
echo "Access not allowed!";
exit();
}
?>
Have access to .htaccess file, thank you :)