HowTo – Problems Using WordPress Behind A Firewall

Filed under: Wordpress Tips

Believe it or not there are installs of WordPress that are not viewable on the interwebs… and when you run your install behind a corporate or local firewall you may find that WordPress can not access all of its features.

The problem is most visible when visiting your dashboard and none of the feeds are available but once you start working with your install you will find that instances where you use curl throw back errors.

Now this is not the problem everyone has when you can’t do an automatic update but if you know you are behind a firewall with a proxy then it could be what causes the errors.

To fix the problem you can add proxy statements to your wp-config.php file this is the same file that you define your database connection and secret keys.

[php]
<pre lang="php">define(‘WP_PROXY_HOST’, ‘192.168.0.1’);
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’);
</pre>
[/php]

There is no need to restart the server simply dump your wp-supercache and load your front page.

This fix should work with WordPress installs from 2.8 on up.

As said before this will cure a specific problem and is not a solution for every connection issue causing failures of core, plugin or theme automatic installs or updates.

Please see our other howtos for more information on managing your WordPress Website.