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', '');
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.

Comments are closed.


  1. Marek

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

  2. Proxy Address

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

  3. Jan

    Thanks Frank for this one, I was losing my time hopelessly modifying class-snoopy in a >= 2.8 WP install.

    @2: This is for making certain parts of WordPress work behind a proxy (ie. the plugin manager, rss feeds on the admin dashboard)…

  4. Brad

    Can/do plugins make use of these settings? I’m sitting behind an authenticated proxy and have had difficulty getting things like flickr plugins to work, and I’m thinking that it’s probably the proxy/firewall that’s stopping them. Does anyone have much experience with plugins in >2.8 and proxies?

  5. Alex

    Thanx a lot for this brief, but working explanation !!!

  6. Will

    Thanks for posting this!

    Saved me a log of headache.

  7. Craig

    Where do you put this code in the php file? Anywhere in particular?


  8. Martin Allert

    It does not seem to work – when I hit the plugins update button, wordpress presents a ftp/ftps selection dialogue.

5 pingbacks

  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