If you setup a WordPress site on a server in intranet behind a proxy, you might get following error when you search plugins and themes in admin console.
An Unexpected HTTP Error occured during the API request.
This is because WordPress does not know the proxy server to talk to external internet. To resolve this, simply enable proxy by adding following lines to wp-config.php file
define(‘WP_PROXY_HOST’, ‘192.168.110.1’);
define(‘WP_PROXY_PORT’, ’80’);
Replace 192.168.110.1 and 80 with your actual proxy server and port.
If the intranet proxy requires user authentication, appending following lines.
define(‘WP_PROXY_USERNAME’, ‘UserName_ReplaceMe’);
define(‘WP_PROXY_PASSWORD’, ‘UserPassword_ReplaceMe’);
Leave a Reply
You must be logged in to post a comment.