WordPress Visitors Same Ip

Today I was able to fix a issue that was happening on one of my WordPress websites. Basically the comments that were being left by users were being recognized by WordPress as comming from the same Ip Address. This Ip address was the address of the nginx proxy.

What I had to do to fix this issue was that I went and added this block of php code to the buttom of the wp-config.php file:

if($_SERVER['HTTP_X_REAL_IP']){$_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_X_REAL_IP'];}

Hopefully this will help any one out there.

Comments

So empty here ... leave a comment!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sidebar