WordPress Proxysupport
May 15th, 2009 by Frank • WordPress Hacks • 6 Comments
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.
Info
- Published in WordPress Hacks
- Tags: Constants, PHP, proxy, WordPress, WordPress 2.8, WordPress Tutorials, WP, wp2.8
- Comment feed | Trackback URL
- read: 6456 | today: 14
- leave a Comment



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