Search help: |
Type what you're looking for. We will try to find it for you! |
|---|
CloudFlare introduced a WordPress plug-in in November, 2010, and is actively updating this plug-in.
* Get the plug-in here: http://wordpress.org/extend/plugins/cloudflare/ * Read about it here: http://blog.cloudflare.com/introducing-the-cloudflare-wordpress-plugin * More details available http://support.cloudflare.com/kb/top-frequently-asked-questions/does-cloudflare-have-a-wordpress-plugin
We strongly encourage use of the plug-in. But, if you prefer not to install the plug-in, there's a more granular way to have WordPress "see" the original connecting IP address of your visitors without modifying the core:
1. Open your wp-config.php file in a text editor.
2. Somewhere in the file, preferably as close to the top as possible, insert the following code:
if ( isset($_SERVER['HTTP_CF_CONNECTING_IP']) && !empty($_SERVER['HTTP_CF_CONNECTING_IP']) )
{
$CF_CONNECTING_IP=explode(",", $_SERVER['HTTP_CF_CONNECTING_IP']);
$_SERVER['REMOTE_ADDR']=trim($CF_CONNECTING_IP[0]); //take the first element in the array
}
3. Save, upload and enjoy.
Works when you bypass CloudFlare as well. This will also pass the proper IP to Akismet for spam checks with or without CloudFlare.