WordPress Proxysupport

Who is using WordPress in an intranet environment, will quickly realize, that despite internet connection, no feed content gets loaded in the backend. In general, it's because of the proxy of the company. So far WordPress wasn't particularly flexible in this case. As of WordPress 2.8 that will change and new constants make ensure that you now can enter the proxy directly to wp-config.php.

Until WordPress 2.7

Up to this version of WordPress it works only with an adjustment in the core, in wp-includes/class-snoopy.php. Here you have to change the settings of $proxy_host, $proxy_port and $_isproxy. The value of var $_isproxy = false; will of course have TRUE as value.

var $host       = "www.php.net"; // host name we are connecting to
var $port       = 8080; // port we are connecting to
var $proxy_host = ""; // proxy host to use
var $proxy_port = ""; // proxy port to use
var $proxy_user = ""; // proxy user to use
var $proxy_pass = ""; // proxy password to use
var $_isproxy   = true; // set if using a proxy server

WordPress 2.8

With the new version it is much easier, because no more intrusion into the core files is necessary and the possibility to define the values in the configuration file wp-config.php.

define('WP_PROXY_HOST', '192.168.84.101');
define('WP_PROXY_PORT', '8080');
define('WP_PROXY_USERNAME', 'my_user_name');
define('WP_PROXY_PASSWORD', 'my_password');
define('WP_PROXY_BYPASS_HOSTS', 'localhost, www.example.com');

Various references are also inTicket 4011.

2 Comments
  1. Marek says:

    Thanks for sharing. I will try figure out how to add this to my WP blog

  2. Proxy Address says:

    Im confused, is this for making a wordpress installation a proxy bypass, or using wordpress on an intranet to create a proxy ?

5 Pings
  1. Exciting new features for developers in WordPress 2.8 - Night Dreaming (by Sudar)
  2. WordPress 2.8: Features and tips — gunnerpress.com
  3. Extensive Wordpress 2.8 Getting Started Guide | tripwire magazine
  4. Wordpress 2.8 | Blog de Maïs.ch
  5. Wordpress 2.8 | Blog de Maïs.ch
Leave a Reply
WP Engineer Tags