Skip to content

Instantly share code, notes, and snippets.

@bluedognz
Last active January 31, 2018 20:44
Show Gist options
  • Save bluedognz/dc6ebda93290320924ecd430e165b6c8 to your computer and use it in GitHub Desktop.
Save bluedognz/dc6ebda93290320924ecd430e165b6c8 to your computer and use it in GitHub Desktop.
All Logins come from the IP 127.0.0.1, so if a user locks the IP out, all users get locked out, as they all have the same IP address.Add this to wp-config.php file, just ABOVE the line:/* That’s all, stop editing! Happy blogging. */
/** Required Code for showing correct IP address */
if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$xffaddrs = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
$_SERVER['REMOTE_ADDR'] = $xffaddrs[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment