deepak-rajpal
7/27/2015 - 3:38 PM

Using proxy and proxy-bypass settings in wordpress config

Using proxy and proxy-bypass settings in wordpress config

<?php 
/* Sometimes we use proxy to secure rendering contents from external sites. But you need to exclude some sites from proxy which are not configured to pass through proxy. We use Bypass then. */
/* WP_PROXY_HOST & WP_PROXY_BYPASS_HOSTS */

/* External site feed etc will be render via following proxy from wp-config.php */
define('WP_PROXY_HOST', 'proxyabc.xyz.com');
define('WP_PROXY_PORT', '80');

/* localhost and site.com urls will not be passed to proxy and they are accessible directly */
define('WP_PROXY_BYPASS_HOSTS', 'localhost, *.site.com');
?>